@use '../frontend/mixins.scss';

.tabs {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    margin-top: 2rem;
    align-items: start;

    @media (max-width: 799px) {
        grid-template-columns: 1fr;
    }
}

.tab {
    // ── Sidebar ──────────────────────────────────────────
    &--buttons {
        display: flex;
        flex-direction: column;
        gap: 4px;
        position: sticky;
        top: 32px;

        h1 {
            font-size: 18px !important;
            font-weight: 600 !important;
            color: #1d2327;
            padding: 0 12px 16px;
            border-bottom: 1px solid #dcdcde;
            margin: 0 0 8px !important;
            line-height: 1.3 !important;
        }

        @media (max-width: 799px) {
            position: static;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 6px;

            h1 { display: none; }
        }
    }

    &--buttons-footer {
        margin-top: 8px;
        padding-top: 16px;
        border-top: 1px solid #dcdcde;
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;

        a {
            text-align: center;
            font-size: 12.5px;
            color: #2271b1;
            text-decoration: none;

            &:hover { text-decoration: underline; }
        }

        .button-primary {
            width: 100% !important;
            text-align: center !important;
            justify-content: center !important;
            border-radius: 6px !important;
            box-shadow: none !important;
        }
    }

    &--button {
        display: block;
        width: 100%;
        padding: 9px 12px;
        border-radius: 6px;
        text-align: left;
        font-size: 13.5px;
        color: #50575e;
        background: transparent;
        border: none;
        box-shadow: none;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;

        &.active {
            background: #fff;
            color: #2271b1;
            font-weight: 500;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        }

        &:hover {
            background: #fff;
            color: #2271b1;
        }

        // Hide svg icons if present — text-only nav
        svg { display: none; }
        span { pointer-events: none; }

        @media (max-width: 799px) {
            width: auto;
            border: 1px solid #dcdcde;
            background: #fff;
        }
    }

    // ── Content area ──────────────────────────────────────
    &--contents {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    &--content {
        display: none;
        flex-direction: column;
        gap: 16px;
    }

    // ── Card section ──────────────────────────────────────
    &--section {
        background: #fff;
        border: 1px solid #dcdcde;
        border-radius: 8px;
        overflow: hidden;

        &-header {
            padding: 12px 20px;
            border-bottom: 1px solid #f0f0f1;
        }

        &-title {
            font-size: 11.5px !important;
            font-weight: 600 !important;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #646970 !important;
            margin: 0 !important;
        }

        &-body {
            padding: 4px 0;
        }
    }

    // ── Setting row ───────────────────────────────────────
    &--setting {
        display: grid;
        grid-template-columns: 210px 1fr;
        gap: 16px;
        align-items: start;
        padding: 16px 20px;
        border-bottom: 1px solid #f6f7f7;
        transition: background 0.1s;

        &:last-child { border-bottom: none; }
        &:hover { background: #fafafa; }

        @media (max-width: 799px) {
            grid-template-columns: 1fr;
        }

        &-header {
            width: auto;
            min-width: 0;
            padding-top: 2px;
        }

        &-title {
            font-weight: 500;
            font-size: 13.5px;
            color: #1d2327;
            margin: 0;
            line-height: 1.4;
        }

        &-description {
            font-size: 12px;
            color: #8c8f94;
            margin: 4px 0 0;
            line-height: 1.5;
        }

        &-content {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
    }
}
