﻿.device-settings-tabs {
    display: flex;
    flex-direction: column;
    width: 165px;
    padding-right: 0;
    background-color: #fff;
    border-right: 1px solid #dee2e6;
}

.device-tab {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: center;
    cursor: pointer;
    color: #212529;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    width: 100%;
}

    .device-tab:hover {
        background-color: #f8f9fa;
        color: #198754;
    }

    .device-tab.active {
        background-color: #f8f9fa;
        border-left: 3px solid #198754;
        color: #198754;
    }

    .device-tab:not(:last-child)::after {
        content: none;
    }

.device-settings-content {
    padding: 1.5rem;
    flex-grow: 1;
    background-color: #fff;
}

.device-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.75rem;
    margin-left: 0;
}

.form-switch {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.device-switch-row .form-check-label {
    flex: 1;
    font-size: 0.95rem;
    margin: 0;
    white-space: normal;
    padding: 0;
    text-align: left;
}

.device-switch-row .form-check-input {
    flex-shrink: 0;
    margin-left: 1rem;
    cursor: pointer;
}

.device-settings-layout {
    display: flex;
    flex-direction: row;
}

.tooltip-container {
    position: relative;
    display: inline-block;
}

.info-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #6c757d;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    margin-left: 6px;
    cursor: help;
}

.tooltip-box {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999;
    text-align: center;
}

.tooltip-container:hover .tooltip-box,
.tooltip-container:focus-within .tooltip-box {
    opacity: 1;
    pointer-events: auto;
}
@media (max-width: 768px) {

    .device-settings-layout {
        flex-direction: column;
    }

    .device-settings-tabs {
        display: none !important;
    }

    #deviceSettingsModal .section-switch {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
        width: 100% !important;
        max-width: 360px; 
        margin: 0 auto;
        box-sizing: border-box;
    }

    .device-settings-content {
        padding-top: 0;
    }
        .device-settings-content .margin-0-0-10.row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: nowrap;
        }

            .device-settings-content .margin-0-0-10.row label.form-label {
                flex: 1;
                margin-bottom: 0;
                font-size: 0.95rem;
            }

            .device-settings-content .margin-0-0-10.row select.form-select {
                width: 45% !important;
                min-width: 120px;
                font-size: 0.95rem;
                padding: 0.35rem 0.5rem;
            }

    .centered-tab-content {
        display: flex;
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .tab-inner {
        display: flex;
        flex-direction: column;
        align-items: stretch !important;
        text-align: left !important;
        width: 100%;
        max-width: 360px; 
    }

        .tab-inner .form-control,
        .tab-inner .form-label {
            width: 100%;
        }

        .tab-inner .form-check-label,
        .tab-inner .form-check-input {
            width: auto;
        }

    .device-switch-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.75rem;
        gap: 0.5rem;
        width: 100%;
        text-align: left;
        margin-left: 0;
    }

        .device-switch-row label {
            flex: 1;
            font-size: 0.95rem;
            margin-bottom: 0;
            white-space: normal;
        }

        .device-switch-row .form-check-input {
            width: 40px;
            height: 20px;
            margin-left: auto;
            transform: scale(1);
            cursor: pointer;
            flex-shrink: 0;
        }

    .styled-dropdown {
        border: 1px solid #198754;
        color: #198754;
        font-weight: 500;
        text-align: center;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
        box-sizing: border-box;
    }

        .styled-dropdown:focus {
            border-color: #198754;
            box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
        }


    .tooltip-container {
        position: relative;
        display: inline-block;
    }


    .tooltip-box {
        position: absolute;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        background-color: #333;
        color: #fff;
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        white-space: nowrap;
        max-width: 90vw;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease-in-out;
        z-index: 9999;
        text-align: center;
    }
    
}


