/* ==========================================================================
   Legal & Contact Pages Styles
   Shared styles for contact.html, privacy.html, terms.html
   ========================================================================== */

/* ==========================================================================
   Hero Section
   ========================================================================== */
.legal-hero {
    background: linear-gradient(135deg, var(--green-bg-light) 0%, var(--green-bg-lighter) 100%);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 103, 71, 0.1);
    border: 1px solid var(--border-subtle);
}

.legal-hero__title {
    font-size: 2.5rem;
    color: var(--accent-green-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.legal-hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.legal-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-subtle);
}

.legal-section__title {
    font-size: 1.5rem;
    color: var(--accent-green-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-subtle);
}

.legal-section__subtitle {
    font-size: 1.25rem;
    color: var(--accent-green-dark);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-section ul {
    color: var(--text-primary);
    line-height: 1.7;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

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

.legal-section strong {
    color: var(--accent-green-dark);
    font-weight: 600;
}

.legal-section a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Highlight Box
   ========================================================================== */
.legal-highlight {
    background: var(--green-bg-lighter);
    border-left: 4px solid var(--accent-green);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.legal-highlight ul {
    margin-bottom: 0;
}

/* ==========================================================================
   Last Updated
   ========================================================================== */
.legal-updated {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.legal-form-group {
    margin-bottom: 1.5rem;
}

.legal-form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.legal-form-label .required {
    color: var(--error-dark);
}

.legal-form-error {
    color: var(--error-dark);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.legal-submit-btn {
    width: 100%;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 103, 71, 0.2);
}

.legal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 103, 71, 0.3);
}

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

/* ==========================================================================
   Alerts
   ========================================================================== */
.legal-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.legal-alert--success {
    background: var(--accent-emerald-pale);
    color: var(--accent-emerald-deep);
    border: 1px solid var(--accent-emerald);
}

.legal-alert--error {
    background: var(--error-pale);
    color: var(--error-deep);
    border: 1px solid var(--error);
}

/* ==========================================================================
   Contact Info Cards
   ========================================================================== */
.legal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.legal-info-card {
    padding: 1.5rem;
    background: var(--green-bg-lighter);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.legal-info-card__icon {
    font-size: 2rem;
    color: var(--accent-green);
    margin-bottom: 0.75rem;
}

.legal-info-card__title {
    color: var(--accent-green-dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.legal-info-card__text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.legal-info-card a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .legal-hero__title {
        font-size: 2rem;
    }

    .legal-section {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
[data-theme="dark"] .legal-hero {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15) 0%, rgba(21, 128, 61, 0.1) 100%);
}

[data-theme="dark"] .legal-hero__title,
[data-theme="dark"] .legal-section__title,
[data-theme="dark"] .legal-section__subtitle {
    color: #86efac;
}

[data-theme="dark"] .legal-info-card {
    background: var(--bg-elevated);
}

/* Compact legal pages aligned with the mobile settings legal screens. */
.legal-page-shell {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
}

.legal-page-shell .legal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1rem, 4vw, 2rem);
    background:
        radial-gradient(circle at 12% 0%, var(--accent-brand-glow) 0%, transparent 18rem),
        linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    padding: clamp(1.25rem, 4vw, 2rem);
    border-radius: 20px;
    margin-bottom: 1rem;
    text-align: left;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.14);
}

.legal-page-shell .legal-hero__eyebrow {
    color: var(--accent-brand);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.legal-page-shell .legal-hero__title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.legal-page-shell .legal-hero__subtitle {
    margin: 0;
}

.legal-page-shell .legal-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--accent-brand-soft);
    border: 1px solid var(--accent-brand-border);
    color: var(--accent-brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-page-shell .legal-section {
    border-radius: 18px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1rem;
    box-shadow: none;
}

.legal-page-shell .legal-section h2 {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.legal-page-shell .legal-section h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.legal-page-shell .legal-section p {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0;
    font-size: 0.92rem;
}

.legal-page-shell .legal-section a {
    color: var(--accent-brand);
}

.legal-page-shell .legal-section--meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-page-shell .legal-section--meta h2,
.legal-page-shell .legal-section--meta p {
    margin: 0;
}

.legal-page-shell .legal-stack {
    display: grid;
    gap: 1rem;
}

.legal-page-shell .legal-item {
    padding: 1rem;
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
    .legal-page-shell .legal-hero {
        grid-template-columns: 1fr;
    }

    .legal-page-shell .legal-section--meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

[data-theme="dark"] .legal-page-shell .legal-hero {
    background:
        radial-gradient(circle at 12% 0%, var(--accent-brand-glow) 0%, transparent 18rem),
        linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

[data-theme="dark"] .legal-page-shell .legal-hero__title {
    color: var(--text-primary);
}
