/* 
  ================================================================
  WebChat Legal Pages - Privacy, Terms & Data Deletion Stylesheet
  EFECINCO TECNOLOGIA - WhatsApp Cloud API & WebChat Platform
  ================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-base: #07070a;
    --bg-surface: #0f0f14;
    --bg-card: rgba(18, 18, 26, 0.75);
    --bg-card-hover: rgba(24, 24, 36, 0.9);
    --bg-glass: rgba(15, 15, 22, 0.65);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(99, 102, 241, 0.35);
    --border-cyan: rgba(6, 182, 212, 0.35);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --indigo: #6366f1;
    --indigo-hover: #4f46e5;
    --indigo-glow: rgba(99, 102, 241, 0.25);
    --cyan: #06b6d4;
    --emerald: #10b981;
    --amber: #f59e0b;
    --rose: #f43f5e;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-subtle);
    --shadow-glow: 0 0 40px -10px rgba(99, 102, 241, 0.2);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Background Ambient Glows */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-circle-1 {
    position: absolute;
    top: -15%;
    left: 15%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0) 70%);
    filter: blur(80px);
}

.ambient-circle-2 {
    position: absolute;
    top: 40%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.09) 0%, rgba(6, 182, 212, 0) 70%);
    filter: blur(80px);
}

/* Header Navbar */
.legal-header {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(7, 7, 10, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    padding: 0.85rem 1.5rem;
}

.legal-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #181824 0%, #0d0d14 100%);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo);
    box-shadow: 0 0 20px -5px rgba(99, 102, 241, 0.4);
}

.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-item {
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
}

.nav-item.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--border-accent);
    box-shadow: 0 0 15px -3px rgba(99, 102, 241, 0.3);
}

.nav-btn-back {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-bright);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-btn-back:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Main Container */
.legal-main {
    max-width: 1040px;
    margin: 2.5rem auto 4rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

/* Hero Section */
.legal-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid var(--border-accent);
    color: #a5b4fc;
    margin-bottom: 1.25rem;
}

.legal-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 1.5rem;
}

.meta-info-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Content Layout */
.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 860px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }
}

/* Sticky Sidebar / TOC */
.legal-sidebar {
    position: sticky;
    top: 6rem;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.toc-link {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    line-height: 1.35;
}

.toc-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

/* Article Content */
.legal-content {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
}

.legal-section {
    margin-bottom: 2.75rem;
    scroll-margin-top: 6rem;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.legal-section h2 svg {
    color: var(--indigo);
    flex-shrink: 0;
}

.legal-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 1.5rem 0 0.75rem;
}

.legal-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.legal-section ul, .legal-section ol {
    margin: 0.75rem 0 1.25rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-section strong {
    color: #f1f5f9;
}

.highlight-box {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
}

.highlight-box.cyan {
    background: rgba(6, 182, 212, 0.07);
    border-color: var(--border-cyan);
}

.highlight-box.emerald {
    background: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.35);
}

.highlight-box h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight-box p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Contact Cards Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--border-bright);
    background: rgba(255, 255, 255, 0.04);
}

.contact-card-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.contact-card-value {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    word-break: break-all;
}

.contact-card a {
    color: #818cf8;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Form Styles for Data Deletion */
.deletion-form-container {
    background: rgba(18, 18, 26, 0.85);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 0 40px -10px rgba(99, 102, 241, 0.2);
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.45rem;
}

.form-label span.req {
    color: var(--rose);
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #ffffff;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.btn-submit-action {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-hover) 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transition: var(--transition);
    width: 100%;
}

.btn-submit-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-submit-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Custom HTML/CSS Toast Feedback (Strictly No alert()) */
.custom-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0f172a;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 400px;
}

.custom-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.custom-toast.success {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.custom-toast.error {
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.2);
}

/* Custom Modal */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    padding: 1.5rem;
}

.custom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-card {
    background: #0d0d14;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 50px -10px rgba(99, 102, 241, 0.3);
    text-align: center;
    transform: scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-overlay.active .custom-modal-card {
    transform: scale(1);
}

.modal-icon-badge {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--emerald);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.modal-protocol-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed var(--border-bright);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    margin: 1.25rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #a5b4fc;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-copy-protocol {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-protocol:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-bright);
    color: #ffffff;
    padding: 0.65rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Footer */
.legal-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
}

@media (max-width: 640px) {
    .legal-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
    .legal-content {
        padding: 1.5rem;
    }
    .legal-title {
        font-size: 1.85rem;
    }
}
