/* Tandem Amore — Brand Styles (from Brand Guide v1.0) */

:root {
    /* ── Core Brand Colors (Teal) ── */
    --teal-50:  #EDF8F9;
    --teal-100: #D4EFF2;
    --teal-200: #A9DFE6;
    --teal-300: #6EC8D5;
    --teal-400: #3BAFC0;
    --teal-500: #2997AA;
    --teal-600: #1F7A8C;
    --teal-700: #175E6D;
    --teal-800: #11424E;
    --teal-900: #0A2830;

    /* ── Sage ── */
    --sage-50:  #F0F7F4;
    --sage-100: #D9EDE6;
    --sage-200: #B3DBCD;
    --sage-400: #52A98E;
    --sage-500: #3B9278;
    --sage-600: #2E7560;

    /* ── Sky ── */
    --sky-50:  #F2F9FC;
    --sky-100: #E1F2F7;
    --sky-400: #5AB8D4;
    --sky-500: #3399BB;

    /* ── Warm ── */
    --warm-50:  #FBF8F6;
    --warm-100: #F3EDE8;

    /* ── Blush (warnings/errors) ── */
    --blush-100: #F7EEED;
    --blush-300: #E8C5C2;
    --blush-500: #C8847E;

    /* ── Semantic Aliases ── */
    --color-primary:      var(--teal-500);
    --color-primary-dark: var(--teal-700);
    --color-secondary:    var(--sage-400);
    --color-accent:       var(--sky-400);
    --color-surface:      #FAFCFC;
    --color-bg:           #F2F8F9;
    --color-text:         #0F3540;
    --color-text-mid:     #3A6170;
    --color-text-soft:    #7A9EA8;
    --color-border:       #C8DFE4;

    /* ── Gradients ── */
    --grad-primary: linear-gradient(135deg, #3BAFC0 0%, #2E8EA0 50%, #1F7A8C 100%);
    --grad-soft:    linear-gradient(135deg, #6EC8D5 0%, #52A98E 100%);
    --grad-bg:      linear-gradient(160deg, #EDF8F9 0%, #F0F7F4 50%, #F2F8F9 100%);

    /* ── Shadows ── */
    --shadow-sm:   0 1px 4px rgba(15,53,64,0.06);
    --shadow-md:   0 4px 16px rgba(15,53,64,0.10);
    --shadow-lg:   0 12px 40px rgba(15,53,64,0.14);
    --shadow-teal: 0 8px 32px rgba(41,151,170,0.25);

    /* ── Radius ── */
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-xl:   32px;
    --radius-full: 9999px;

    /* ── Typography ── */
    --font-display: 'DM Serif Display', serif;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body:    'DM Sans', sans-serif;

    /* Legacy aliases for backward compat */
    --tda-teal: var(--teal-400);
    --tda-teal-dark: var(--teal-600);
    --tda-accent: var(--teal-600);
    --tda-accent-dark: var(--teal-700);
    --tda-teal-light: var(--teal-100);
    --tda-teal-bg: var(--teal-50);
    --tda-blue: var(--sky-400);
    --tda-gradient: var(--grad-primary);
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
}

.app-shell {
    min-height: 100vh;
}

/* ── Buttons ── */
.btn-tda {
    background: var(--grad-primary);
    border: none;
    color: #fff;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-teal);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.2s;
}
.btn-tda:hover {
    box-shadow: 0 12px 40px rgba(41,151,170,0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-tda-pink {
    background-color: var(--teal-600);
    border-color: var(--teal-600);
    color: #fff;
    border-radius: var(--radius-full);
}
.btn-tda-pink:hover {
    background-color: var(--teal-700);
    border-color: var(--teal-700);
    color: #fff;
}

.btn-outline-tda {
    border: 1.5px solid rgba(255,255,255,0.5);
    color: #fff;
    border-radius: var(--radius-full);
    transition: all 0.2s;
}
.btn-outline-tda:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

.bg-tda-gradient {
    background: var(--grad-primary) !important;
}

.text-tda-pink {
    color: var(--teal-600) !important;
}

.text-tda-blue {
    color: var(--sky-400) !important;
}

/* ── Auth page background ── */
.auth-bg {
    background: var(--grad-primary);
    min-height: 100vh;
}

.auth-bg .card {
    border-radius: var(--radius-xl) !important;
    border: none;
    box-shadow: var(--shadow-lg);
}

/* ── Admin sidebar ── */
.admin-sidebar {
    background: linear-gradient(180deg, var(--teal-800) 0%, var(--teal-600) 100%);
}

/* Interest pill buttons active state */
.interest-check:checked + span {
    background-color: var(--teal-500);
    color: white;
}

/* Photo card brand colors */
.photo-card:hover, .photo-card.drag-over {
    border-color: var(--teal-400) !important;
    box-shadow: var(--shadow-teal) !important;
}

/* ── Global loading overlay ── */
#tda-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(250,252,252,0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    backdrop-filter: blur(4px);
    transition: opacity 0.15s ease;
}
#tda-loading-overlay.tda-hidden {
    display: none;
}
#tda-loading-overlay .tda-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid var(--teal-100);
    border-top-color: var(--teal-500);
    border-radius: 50%;
    animation: tda-spin 0.75s linear infinite;
}
#tda-loading-overlay .tda-spinner-text {
    font-size: 0.95rem;
    color: var(--teal-600);
    font-weight: 500;
    letter-spacing: 0.02em;
}
@keyframes tda-spin {
    to { transform: rotate(360deg); }
}
/* Disable button double-click while loading */
body.tda-loading button[type="submit"],
body.tda-loading a.nav-link {
    pointer-events: none;
    opacity: 0.65;
}

/* ── Help Panel (right-side slideout) ─────────────────────────────── */
#helpPanelOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,40,48,0.25);
    z-index: 1070;
    transition: opacity 0.2s;
}
#helpPanelOverlay.open { display: block; }

#helpPanel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    background: var(--color-surface);
    box-shadow: -4px 0 24px rgba(15,53,64,0.12);
    z-index: 1071;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}
#helpPanel.open { right: 0; }

#helpPanel .hp-header {
    padding: 1rem;
    background: var(--grad-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
#helpPanel .hp-header h5 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.2rem;
}

#helpPanel .hp-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
#helpPanel .hp-tabs button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: var(--teal-50);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--color-text-soft);
    transition: all 0.15s;
}
#helpPanel .hp-tabs button.active {
    background: #fff;
    color: var(--teal-600);
    border-bottom: 3px solid var(--teal-500);
}

#helpPanel .hp-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* FAQ Accordion */
.faq-item { margin-bottom: 0.5rem; }
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    background: var(--color-surface);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    transition: background 0.15s;
}
.faq-question:hover { background: var(--teal-50); }
.faq-question .faq-arrow { transition: transform 0.2s; font-size: 0.75rem; }
.faq-question.open .faq-arrow { transform: rotate(90deg); }
.faq-answer {
    display: none;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--color-text-mid);
    line-height: 1.6;
    border-left: 3px solid var(--teal-400);
    margin: 0.3rem 0 0 0.5rem;
}
.faq-answer.open { display: block; }

.faq-category {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--teal-600);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1rem 0 0.5rem;
}
.faq-category:first-child { margin-top: 0; }

/* Chat interface */
#chatContainer { display: flex; flex-direction: column; height: 100%; }
#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.chat-msg {
    max-width: 85%;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
    word-wrap: break-word;
}
.chat-msg.bot {
    align-self: flex-start;
    background: white;
    color: var(--color-text);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}
.chat-msg.user {
    align-self: flex-end;
    background: var(--grad-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg .chat-time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 0.2rem;
}
#chatInput {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem 0 0;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}
#chatInput input {
    flex: 1;
    background: var(--teal-50);
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
#chatInput input::placeholder { color: var(--color-text-soft); }
#chatInput input:focus {
    border-color: var(--teal-400);
    background: white;
}
#chatInput button {
    border: none;
    background: var(--grad-primary);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--shadow-teal);
    transition: all 0.2s;
}
#chatInput button:hover {
    box-shadow: 0 12px 40px rgba(41,151,170,0.4);
    transform: translateY(-1px);
}
.chat-typing {
    align-self: flex-start;
    padding: 0.6rem 0.9rem;
    background: white;
    border-radius: 14px;
    font-size: 0.85rem;
    color: var(--color-text-soft);
    box-shadow: var(--shadow-sm);
}
.chat-typing span {
    display: inline-block;
    animation: typing-dots 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dots {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.hp-nav-btn {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.5);
    color: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}
.hp-nav-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
}

/* ── Navbar brand text ── */
.navbar-brand .fw-bold {
    font-family: var(--font-body);
    letter-spacing: 0.06em;
}

/* ════════════════════════════════════════════════════════════════════════════
   Landing Page
   ════════════════════════════════════════════════════════════════════════════ */

.lp-hero {
    background: var(--grad-primary);
    color: white;
    padding: 6rem 1rem 5rem;
}
.lp-hero-logo { max-width: 200px; height: auto; }
.lp-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    margin-bottom: 1rem;
}
.lp-hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 auto;
    opacity: 0.92;
    line-height: 1.7;
}

.lp-section {
    padding: 4.5rem 1rem;
}
.lp-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 0.5rem;
}
.lp-section-subtitle {
    text-align: center;
    color: var(--color-text-mid);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* How it works steps */
.lp-step-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    height: 100%;
}
.lp-step-number {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: white;
    font-family: var(--font-display);
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.lp-step-card h5 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
}
.lp-step-card p {
    color: var(--color-text-mid);
    font-size: 0.95rem;
}

/* Feature cards */
.lp-feature-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    text-align: center;
    height: 100%;
    box-shadow: var(--shadow-sm);
}
.lp-feature-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}
.lp-feature-card h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.lp-feature-card p {
    color: var(--color-text-mid);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Privacy card */
.lp-privacy-card {
    background: var(--teal-50);
    border: 1px solid var(--teal-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.lp-privacy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lp-privacy-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--teal-100);
    color: var(--color-text);
    font-size: 0.95rem;
}
.lp-privacy-list li:last-child { border-bottom: none; }
.lp-privacy-list li::before {
    content: "\2713";
    color: var(--color-primary);
    font-weight: bold;
    margin-right: 0.6rem;
}

/* Stats */
.lp-stat { padding: 1rem 0; }
.lp-stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
}
.lp-stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}
.lp-stat-detail {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.15rem;
    font-style: italic;
}

/* Info pages */
.lp-info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}
.lp-info-card h4, .lp-info-card h5 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
}
.lp-info-card p, .lp-info-card li {
    color: var(--color-text-mid);
    line-height: 1.7;
}
.lp-info-card a { color: var(--color-primary); }
.lp-info-card a:hover { color: var(--color-primary-dark); }

.lp-values-list { padding-left: 1.2rem; }
.lp-values-list li { margin-bottom: 0.5rem; }

.lp-resource-links { list-style: none; padding: 0; }
.lp-resource-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}
.lp-resource-links li:last-child { border-bottom: none; }
.lp-resource-links a {
    font-weight: 500;
    text-decoration: none;
}
.lp-resource-links a:hover { text-decoration: underline; }

.lp-sitemap-links { list-style: none; padding: 0; }
.lp-sitemap-links li { padding: 0.3rem 0; }
.lp-sitemap-links a {
    color: var(--color-primary);
    text-decoration: none;
}
.lp-sitemap-links a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════════════
   Footer
   ════════════════════════════════════════════════════════════════════════════ */

.tda-footer {
    background: var(--teal-900);
    color: rgba(255,255,255,0.75);
    padding: 3rem 0 1.5rem;
}
.tda-footer-heading {
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}
.tda-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tda-footer-links li { margin-bottom: 0.4rem; }
.tda-footer-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}
.tda-footer-links a:hover { color: white; }

.tda-footer-divider {
    border-color: rgba(255,255,255,0.15);
    margin: 2rem 0 1rem;
}
.tda-footer-bottom {
    text-align: center;
    font-size: 0.85rem;
}
.tda-footer-bottom p { margin-bottom: 0.25rem; }
.tda-footer-promise {
    font-style: italic;
    color: var(--teal-300);
    font-size: 0.8rem;
}
