/* ==========================================================================
   Legal Pages (Terms & Conditions / Privacy Policy) - Udaipur Taxi
   Shares CSS variables defined in layouts/front.blade.php (:root)
   ========================================================================== */

/* Page Banner */
.legal-hero-section {
    background: linear-gradient(180deg, #f0f7fd 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    padding-top: 2.75rem;
    padding-bottom: 3.25rem;
    border-bottom: 1px solid var(--soft-border);
}
.legal-hero-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 100%;
    background-image: radial-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.legal-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    position: relative;
}
.legal-breadcrumb a {
    color: var(--text-body);
    text-decoration: none !important;
}
.legal-breadcrumb a:hover { color: var(--primary-blue); }
.legal-breadcrumb .sep { color: #cbd5e1; }
.legal-breadcrumb .current { color: var(--primary-blue); }

.legal-hero-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #092b59 0%, #1769e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(23, 105, 232, 0.28);
    margin-bottom: 1.1rem;
    position: relative;
}
.legal-hero-title {
    font-size: 2.5rem;
    line-height: 1.15;
    color: var(--deep-navy);
    font-weight: 800;
    letter-spacing: -0.6px;
    margin-bottom: 0.9rem;
    position: relative;
}
@media (max-width: 767px) {
    .legal-hero-title { font-size: 1.85rem; }
}
.legal-hero-lead {
    font-size: 1.02rem;
    color: var(--text-body);
    max-width: 640px;
    margin-bottom: 1.1rem;
    position: relative;
}
.legal-updated-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--soft-border);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    position: relative;
}
.legal-updated-pill i { color: var(--primary-blue); }

/* Body Layout */
.legal-body-section {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

/* Sticky TOC Sidebar */
.legal-toc-wrap {
    position: sticky;
    top: 96px;
}
.legal-toc-card {
    background: #f8fafc;
    border: 1px solid var(--soft-border);
    border-radius: 16px;
    padding: 1.4rem 1.3rem;
}
.legal-toc-title {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.9rem;
}
.legal-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
}
.legal-toc-list li { margin-bottom: 4px; counter-increment: toc-counter; }
.legal-toc-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 0.6rem;
    border-radius: 9px;
    font-size: 0.87rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.legal-toc-list a::before {
    content: counter(toc-counter);
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.legal-toc-list a:hover {
    background: #eff6ff;
    color: var(--primary-blue);
}
.legal-toc-list a:hover::before {
    background: var(--primary-blue);
    color: #fff;
}

.legal-toc-help-box {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--soft-border);
}
.legal-toc-help-box .help-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--deep-navy);
    margin-bottom: 0.6rem;
}
.legal-toc-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.55rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none !important;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}
.legal-toc-help-btn.wa-btn {
    background-color: var(--wa-green);
    color: #fff !important;
}
.legal-toc-help-btn.wa-btn:hover { background-color: var(--wa-green-hover); }
.legal-toc-help-btn.call-btn {
    background: #eff6ff;
    color: var(--primary-blue) !important;
    border: 1.5px solid #bfdbfe;
}
.legal-toc-help-btn.call-btn:hover { background: #dbeafe; }

/* Mobile TOC Accordion Toggle */
.legal-toc-mobile-toggle {
    display: none;
}
@media (max-width: 991.98px) {
    .legal-toc-wrap { position: static; margin-bottom: 1.75rem; }
    .legal-toc-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: #f8fafc;
        border: 1px solid var(--soft-border);
        border-radius: 14px;
        padding: 0.9rem 1.1rem;
        font-weight: 700;
        color: var(--deep-navy);
        font-size: 0.92rem;
    }
    .legal-toc-mobile-toggle i.chev { transition: transform 0.25s ease; color: #64748b; }
    .legal-toc-mobile-toggle[aria-expanded="true"] i.chev { transform: rotate(180deg); }
    .legal-toc-card { margin-top: 8px; }
}

/* Content Column */
.legal-content-col { color: var(--text-body); }

.legal-section {
    padding-bottom: 2.1rem;
    margin-bottom: 2.1rem;
    border-bottom: 1px solid #f1f5f9;
    scroll-margin-top: 96px;
}
.legal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.legal-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1rem;
}
.legal-section-num {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.legal-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--deep-navy);
    margin: 0;
}
@media (max-width: 575px) {
    .legal-section-title { font-size: 1.12rem; }
}
.legal-section-body p {
    font-size: 0.96rem;
    line-height: 1.75;
    margin-bottom: 0.9rem;
}
.legal-section-body p:last-child { margin-bottom: 0; }
.legal-section-body ul, .legal-section-body ol {
    font-size: 0.96rem;
    line-height: 1.75;
    padding-left: 1.3rem;
    margin-bottom: 0.9rem;
}
.legal-section-body li { margin-bottom: 0.45rem; }
.legal-section-body li:last-child { margin-bottom: 0; }
.legal-section-body strong { color: var(--text-heading); }
.legal-section-body a.inline-link {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: underline !important;
}

/* Info / Note callouts */
.legal-note-box {
    display: flex;
    gap: 12px;
    background: #f0f7fd;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-top: 0.5rem;
}
.legal-note-box.note-warn {
    background: #fffbeb;
    border-color: #fde68a;
}
.legal-note-box .note-icon {
    flex-shrink: 0;
    color: var(--primary-blue);
    font-size: 1.05rem;
    margin-top: 2px;
}
.legal-note-box.note-warn .note-icon { color: #d97706; }
.legal-note-box p { font-size: 0.88rem; margin: 0; line-height: 1.65; color: #334155; }

/* Data Table (Privacy: what we collect) */
.legal-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
    border: 1px solid var(--soft-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.legal-data-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--soft-border);
    text-align: left;
}
.legal-data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    color: #334155;
    line-height: 1.55;
}
.legal-data-table tbody tr:last-child td { border-bottom: none; }
.legal-data-table tbody td:first-child { font-weight: 700; color: var(--deep-navy); white-space: nowrap; }
@media (max-width: 575px) {
    .legal-data-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Bottom Contact CTA */
.legal-contact-cta {
    margin-top: 3rem;
    background: linear-gradient(135deg, #092b59 0%, #0f3d85 100%);
    border-radius: 22px;
    padding: 2.2rem 2.4rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.legal-contact-cta::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(37,99,235,0.35) 0%, transparent 70%);
}
.legal-contact-cta-text h3 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.legal-contact-cta-text p {
    color: #b6c6e3;
    font-size: 0.92rem;
    margin: 0;
    max-width: 460px;
}
.legal-contact-cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
}
.legal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.4rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.25s ease;
}
.legal-cta-btn.primary {
    background: #ffffff;
    color: var(--primary-blue) !important;
}
.legal-cta-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.legal-cta-btn.wa {
    background-color: var(--wa-green);
    color: #fff !important;
}
.legal-cta-btn.wa:hover { background-color: var(--wa-green-hover); transform: translateY(-2px); }

@media (max-width: 575px) {
    .legal-contact-cta { padding: 1.75rem 1.4rem; flex-direction: column; align-items: flex-start; }
    .legal-contact-cta-actions { width: 100%; }
    .legal-cta-btn { flex: 1; justify-content: center; }
}
