/**
 * Terms of Service Page Styles — Figma-exact two-column layout
 * Sticky sidebar TOC, long-form legal content, mobile bottom sheet
 */

/* ==========================================
   SECTION 1 — TOS MAIN CONTAINER & TITLE
   ========================================== */

.tos-main {
    padding: 96px 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

.tos-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tos-title {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 64px;
    font-weight: 400;
    line-height: 73px;
    color: #2D1F1F;
    text-transform: capitalize;
    margin: 0;
}

.tos-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    color: #666666;
    margin: 0;
}

/* ==========================================
   SECTION 2 — TWO-COLUMN LAYOUT
   ========================================== */

.tos-columns {
    display: flex;
    gap: 48px;
    width: 100%;
}

.tos-sidebar {
    width: 431px;
    flex-shrink: 0;
}

.tos-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ==========================================
   SECTION 3 — SIDEBAR TOC NAVIGATION
   ========================================== */

.tos-sidebar-nav {
    border: 1px solid #E0DCD3;
    border-radius: 20px;
    overflow: hidden;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.tos-sidebar-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    min-height: 48px;
    border-bottom: 1px solid #E0DCD3;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: rgba(45, 31, 31, 0.7);
    background: #fff;
    box-sizing: border-box;
    transition: all 0.2s ease;
    user-select: none;
}

.tos-sidebar-item:last-child {
    border-bottom: none;
}

.tos-sidebar-item:hover {
    color: #2D1F1F;
}

.tos-sidebar-item.active {
    font-weight: 600;
    color: #2D1F1F;
    border-bottom: 2px solid #2D1F1F;
}

.tos-sidebar-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ==========================================
   SECTION 4 — CONTENT SECTIONS
   ========================================== */

.tos-sections {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.tos-section-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tos-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 39px;
    text-transform: capitalize;
    color: #2D1F1F;
    letter-spacing: -0.02em;
    margin: 0;
}

.tos-section-body p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    color: #2D1F1F;
    margin: 0;
}

.tos-section-body p + p {
    margin-top: 16px;
}

/* ==========================================
   SECTION 5 — MOBILE BOTTOM SHEET
   ========================================== */

.tos-mobile-bar {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    z-index: 100;
    border: 1px solid #E0DCD3;
    border-radius: 8px;
    background: #fff;
    padding: 12px 16px;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tos-mobile-bar-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2D1F1F;
}

.tos-mobile-bar svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.tos-mobile-bar-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(45, 31, 31, 0.1);
    border-radius: 0 0 7px 7px;
    overflow: hidden;
}

.tos-mobile-bar-progress-fill {
    height: 100%;
    background: #2D1F1F;
    width: 0%;
    transition: width 0.3s ease;
}

.tos-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tos-mobile-overlay.active {
    display: flex;
}

.tos-mobile-overlay-card {
    background: #fff;
    border: 1px solid #E0DCD3;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
}

.tos-mobile-overlay-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    min-height: 48px;
    border-bottom: 1px solid #E0DCD3;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: rgba(45, 31, 31, 0.7);
    background: #fff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.tos-mobile-overlay-item:last-child {
    border-bottom: none;
}

.tos-mobile-overlay-item.active {
    font-weight: 600;
    color: #2D1F1F;
}

.tos-mobile-overlay-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ==========================================
   RESPONSIVE — MOBILE (max-width: 767px)
   ========================================== */

@media (max-width: 767px) {
    .tos-main {
        padding: 48px 24px 24px;
    }

    .tos-title {
        font-size: 32px;
        line-height: 36px;
    }

    .tos-subtitle {
        font-size: 14px;
        line-height: 24px;
    }

    .tos-columns {
        flex-direction: column;
        gap: 24px;
    }

    .tos-sidebar {
        display: none;
    }

    .tos-mobile-bar {
        display: flex;
    }

    .tos-section-title {
        font-size: 20px;
        line-height: 28px;
    }

    .tos-section-body p {
        font-size: 14px;
        line-height: 24px;
    }

}
