/*
 * QuickSharePhotos - Legal & Contact Page Styles
 * Used by: privacy.php, terms.php, contact.php
 */

/* ── Compact hero ── */
.legal-hero {
    background: var(--primary-gradient);
    padding: 52px 20px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.legal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 55%, rgba(255,255,255,0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 25%, rgba(255,255,255,0.07) 0%, transparent 50%);
    pointer-events: none;
}
.legal-hero-content {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}
.legal-page-label {
    display: inline-block;
    font-size: 0.68em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.88);
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,0.22);
}
.legal-hero h1 {
    font-size: 2.6em;
    font-weight: 300;
    color: white;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}
.legal-hero h1 strong { font-weight: 700; }
.legal-hero-meta {
    font-size: 0.85em;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
}

/* ── Two-column layout (privacy, terms) ── */
.legal-layout {
    display: grid;
    grid-template-columns: 1fr 252px;
    gap: 28px;
    max-width: 1020px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    align-items: start;
}

/* ── Sticky sidebar TOC ── */
.legal-toc {
    position: sticky;
    top: 24px;
    background: white;
    border-radius: 18px;
    padding: 24px 20px;
    border: 1px solid #ebe7f4;
    box-shadow: 0 2px 18px rgba(102,126,234,0.07);
    order: 2;
}
.legal-toc-label {
    display: block;
    font-size: 0.66em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #667eea;
    margin-bottom: 14px;
}
.legal-toc a {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 7px 10px;
    color: #888;
    text-decoration: none;
    font-size: 0.82em;
    border-radius: 8px;
    transition: all 0.18s ease;
    border-left: 2px solid transparent;
    margin-bottom: 2px;
    line-height: 1.4;
}
.legal-toc .toc-num {
    font-size: 0.78em;
    font-weight: 700;
    color: #ccc;
    min-width: 16px;
    margin-top: 1px;
    transition: color 0.18s;
    flex-shrink: 0;
}
.legal-toc a:hover,
.legal-toc a.toc-active {
    background: rgba(102,126,234,0.07);
    color: #667eea;
    border-left-color: #667eea;
    padding-left: 13px;
}
.legal-toc a:hover .toc-num,
.legal-toc a.toc-active .toc-num { color: #667eea; }
.toc-divider { height: 1px; background: #f0edf8; margin: 14px 0; }
.toc-aux-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8em;
    color: #bbb;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.18s;
}
.toc-aux-link:hover { color: #667eea; background: rgba(102,126,234,0.05); }

/* ── Main content card ── */
.legal-content {
    background: white;
    border-radius: 20px;
    padding: 52px 56px;
    border: 1px solid #ebe7f4;
    box-shadow: 0 4px 28px rgba(102,126,234,0.07);
    order: 1;
}
.legal-intro {
    font-size: 1.02em;
    line-height: 1.9;
    color: #5a5870;
    margin-bottom: 2.5em;
    padding-bottom: 2.5em;
    border-bottom: 1px solid #f0edf8;
}

/* ── Sections ── */
.legal-section {
    margin-bottom: 2.6em;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.42s ease, transform 0.42s ease;
}
.legal-section.visible { opacity: 1; transform: translateY(0); }
.legal-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.1em;
    padding-bottom: 1em;
    border-bottom: 1px solid #f5f3fc;
}
.section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.72em;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102,126,234,0.28);
}
.legal-section h2 {
    font-size: 1.04em;
    font-weight: 600;
    color: #1a1928;
    margin: 0;
    letter-spacing: -0.1px;
}
.legal-section p {
    color: #5a5870;
    line-height: 1.85;
    margin-bottom: 0.9em;
    font-size: 0.95em;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section p.legal-disclaimer {
    font-size: 0.83em;
    line-height: 1.75;
    color: #7a7890;
    background: #f8f6fc;
    border: 1px solid #f0edf8;
    border-radius: 10px;
    padding: 14px 18px;
}
.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.legal-section ul li {
    padding: 11px 16px 11px 40px;
    background: #f8f6fc;
    border-radius: 10px;
    color: #5a5870;
    line-height: 1.65;
    font-size: 0.93em;
    position: relative;
    border: 1px solid #f0edf8;
}
.legal-section ul li::before {
    content: '→';
    position: absolute;
    left: 14px;
    top: 12px;
    color: #667eea;
    font-weight: 700;
    font-size: 0.88em;
}
.legal-section ul li strong { color: #2d2d3f; font-weight: 600; }
.legal-section a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid rgba(102,126,234,0.25);
    transition: border-color 0.15s;
}
.legal-section a:hover { border-bottom-color: #667eea; }

/* ────────────────────────────────────
   Contact Page Specific Styles
   ──────────────────────────────────── */

.contact-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* White card shell */
.contact-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #ebe7f4;
    box-shadow: 0 4px 28px rgba(102,126,234,0.07);
    margin-bottom: 24px;
    overflow: hidden;
}
.contact-card-header { padding: 28px 36px 0; }
.contact-card-header h2 {
    font-size: 1.15em;
    font-weight: 600;
    color: #1a1928;
    margin: 0 0 6px;
}
.contact-card-header p {
    font-size: 0.9em;
    color: #888;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* Category card grid */
.cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 36px 28px;
}
.cat-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 2px solid #ede9f8;
    background: #faf8ff;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    text-align: left;
    -webkit-user-select: none;
    user-select: none;
}
.cat-card:hover {
    border-color: #c3b8f0;
    background: #f5f2ff;
    box-shadow: 0 2px 12px rgba(102,126,234,0.10);
}
.cat-card.selected {
    border-color: #667eea;
    background: rgba(102,126,234,0.06);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12), 0 2px 12px rgba(102,126,234,0.12);
}
.cat-icon { font-size: 1.6em; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.cat-name {
    font-size: 0.88em;
    font-weight: 600;
    color: #2d2d3f;
    margin-bottom: 3px;
    line-height: 1.3;
}
.cat-card.selected .cat-name { color: #667eea; }
.cat-email { font-size: 0.76em; color: #aaa; font-weight: 400; }
.cat-card.selected .cat-email { color: #8fa3f5; }

/* Form area */
.contact-form-wrap {
    padding: 0 36px 36px;
    border-top: 1px solid #f0edf8;
}
.contact-form-wrap h3 {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #667eea;
    margin: 24px 0 18px;
}

/* Notices */
.contact-notice {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.92em;
    line-height: 1.5;
}
.contact-notice.error {
    background: #fff0f0;
    border-left: 4px solid #e05050;
    color: #c03030;
}
.contact-notice.success {
    background: #eff8f0;
    border-left: 4px solid #48bb78;
    color: #2d6a3f;
}

/* Form fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.req { color: #e05050; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dddde8;
    border-radius: 10px;
    font-size: 0.94em;
    font-family: inherit;
    color: #333;
    background: #fafafe;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.10);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.cat-select-hidden { display: none; }
.url-group { display: none; }

/* Submit */
.submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}
.submit-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 13px 36px;
    font-size: 0.96em;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s, transform 0.15s;
    letter-spacing: 0.2px;
}
.submit-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.submit-btn:active { transform: translateY(0); }
.submit-hint { font-size: 0.78em; color: #bbb; }

/* Direct contacts grid */
.direct-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #f0edf8;
}
.direct-item {
    background: white;
    padding: 22px 28px;
    transition: background 0.15s;
}
.direct-item:hover { background: #faf8ff; }
.direct-item-icon { font-size: 1.4em; margin-bottom: 8px; display: block; }
.direct-item-name { font-size: 0.88em; font-weight: 600; color: #1a1928; margin-bottom: 4px; }
.direct-item-desc { font-size: 0.8em; color: #999; line-height: 1.5; margin-bottom: 10px; }
.direct-item-desc a { color: #667eea; text-decoration: none; }
.direct-item-email {
    font-size: 0.82em;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(102,126,234,0.2);
    transition: border-color 0.15s;
}
.direct-item-email:hover { border-bottom-color: #667eea; }

/* ── Responsive ── */
@media (max-width: 820px) {
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { order: -1; position: static; }
    .legal-content { padding: 36px 30px; }
}
@media (max-width: 640px) {
    .cat-grid { grid-template-columns: 1fr; }
    .direct-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .contact-card-header,
    .cat-grid,
    .contact-form-wrap { padding-left: 20px; padding-right: 20px; }
    .direct-item { padding: 18px 20px; }
}
@media (max-width: 500px) {
    .legal-content { padding: 28px 20px; }
    .legal-hero h1 { font-size: 2em; }
}
