/* FilaBridge Dashboard - Tab Styles */

/* Main Tab Navigation */
.tabs {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 8px 8px 0 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

a.tab {
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.tab:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.tab.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-bottom: 3px solid #4CAF50;
}

.tab-content {
    display: none;
    padding: 30px;
    background: #1a1a1a;
    color: #fff;
    overflow: visible;
}

.tab-content.active {
    display: block;
    overflow: visible;
}

/* NFC Sub-tabs */
.nfc-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.nfc-tab {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
    margin-right: 5px;
}

.nfc-tab:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nfc-tab.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-bottom: 3px solid #4CAF50;
}

.nfc-tab-content {
    display: none;
    overflow: visible;
}

.nfc-tab-content.active {
    display: block;
    overflow: visible;
}

/* Settings Sub-tabs */
.settings-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.settings-tab {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
    margin-right: 5px;
}

.settings-tab:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.settings-tab.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-bottom: 3px solid #4CAF50;
}

.settings-tab-content {
    display: none;
    overflow: visible;
}

.settings-tab-content.active {
    display: block;
    overflow: visible;
}

/* Mobile / narrow viewports */
@media (max-width: 600px) {
    /* Main tabs: let them wrap onto multiple rows rather than crushing each
       label with flex:1 on a screen too narrow to hold them abreast. */
    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 0 auto;
        padding: 12px 14px;
        font-size: 14px;
    }

    /* Sub-tab bars can't wrap cleanly (they carry a bottom border), so scroll
       them horizontally and keep each tab at its natural width. */
    .nfc-tabs,
    .settings-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nfc-tab,
    .settings-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 14px;
    }

    /* Reclaim horizontal space eaten by desktop-sized content padding. */
    .tab-content {
        padding: 15px;
    }
}
