/**
 * StickyVerses — Default Skin (warm-trust)
 * Mobile-first, scripture-focused design
 *
 * BizFactory skin system: this file is the visual identity layer.
 * All feature templates use these classes — no inline styles in base.php.
 */

:root {
    --sv-primary: #4A6741;
    --sv-primary-light: #6B8F60;
    --sv-accent: #D4A853;
    --sv-bg: #FAF8F5;
    --sv-card: #FFFFFF;
    --sv-text: #2D2D2D;
    --sv-text-light: #6B6B6B;
    --sv-border: #E8E4DF;
    --sv-success: #5C8A4D;
    --sv-radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--sv-bg);
    color: var(--sv-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.sv-header {
    background: var(--sv-primary);
    color: white;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sv-header a { color: white; text-decoration: none; }
.sv-header h1 { font-size: 1.1rem; font-weight: 600; }
.sv-back { font-size: 1.4rem; line-height: 1; }

/* Brand link — primary header identity */
.sv-brand {
    color: white;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    flex: 1;
}

/* Desktop nav in header — hidden on mobile */
.sv-header-nav { display: none; }
.sv-header-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 4px 0;
    transition: color 0.2s;
}
.sv-header-nav a:hover,
.sv-header-nav a.active {
    color: white;
}

/* Auth link */
.sv-header-auth {
    font-size: 0.85rem;
    opacity: 0.85;
    white-space: nowrap;
}

/* Page title in header — hidden (brand is the identity) */
.sv-header-title { display: none; }

/* Layout */
.sv-container { max-width: 600px; margin: 0 auto; padding: 20px 16px; }
.sv-page-body { padding-bottom: 110px; }

/* Cards */
.sv-card {
    background: var(--sv-card);
    border-radius: var(--sv-radius);
    border: 1px solid var(--sv-primary-light);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.sv-card h2 { font-size: 1.15rem; margin-bottom: 8px; }
.sv-card p { color: var(--sv-text-light); font-size: 1rem; }

/* Buttons */
.sv-btn {
    display: inline-block;
    background: var(--sv-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.sv-btn:hover { background: var(--sv-primary-light); }
.sv-btn-outline {
    background: transparent;
    color: var(--sv-primary);
    border: 2px solid var(--sv-primary);
}

/* Scripture */
.sv-scripture {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    padding: 24px;
    background: linear-gradient(135deg, #f8f6f0, #faf8f2);
    border-left: 4px solid var(--sv-accent);
    border-radius: 0 var(--sv-radius) var(--sv-radius) 0;
    margin-bottom: 16px;
}
.sv-scripture cite {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--sv-text-light);
    margin-top: 12px;
    font-family: -apple-system, system-ui, sans-serif;
}

/* Section labels */
.sv-section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--sv-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

/* Progress */
.sv-progress-bar {
    height: 6px;
    background: var(--sv-border);
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}
.sv-progress-fill {
    height: 100%;
    background: var(--sv-success);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Mini per-section feedback */
.sv-mini-feedback {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--sv-border);
    flex-wrap: wrap;
}
.sv-mini-feedback > button {
    background: none;
    border: 2px solid #D1CCC5;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.8;
}
.sv-mini-feedback > button:hover { opacity: 1; border-color: var(--sv-primary); }
.sv-mini-feedback > button.active { opacity: 1; border-color: var(--sv-primary); background: #EDF2EB; }
/* Social sharing styles loaded from brick: /assets/css/social-share.css */
.sv-feedback-expand {
    width: 100%;
    margin-top: 8px;
}
.sv-feedback-expand textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--sv-border);
    border-radius: 8px;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}
.sv-feedback-expand textarea:focus {
    outline: none;
    border-color: var(--sv-primary);
}

/* Sentiment */
.sv-sentiment {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 16px 0;
}
.sv-sentiment button {
    background: var(--sv-card);
    border: 2px solid #999;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sv-sentiment button:hover { border-color: var(--sv-primary); transform: scale(1.1); }
.sv-sentiment button.active { border-color: var(--sv-primary); background: #EDF2EB; }

/* Bottom nav */
.sv-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sv-card);
    border-top: 1px solid var(--sv-border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
}
.sv-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--sv-text-light);
    font-size: 0.75rem;
    gap: 2px;
    padding: 4px 12px;
}
.sv-nav a.active { color: var(--sv-primary); }
.sv-nav a span { font-size: 1.3rem; }

/* Empty state */
.sv-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--sv-text-light);
}

/* Badges */
.sv-figure-badge {
    display: inline-block;
    background: #EDF2EB;
    color: var(--sv-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Milestones */
.sv-milestone {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #EDF2EB, #f0f5ed);
    border-radius: var(--sv-radius);
    margin: 16px 0;
}
.sv-milestone h3 { color: var(--sv-primary); margin-bottom: 4px; }

/* Hero cards (gradient overlay) */
.sv-hero {
    text-align: center;
    background: linear-gradient(135deg, var(--sv-primary), var(--sv-primary-light));
    color: white;
    border: none;
    padding: 28px 20px;
    border-radius: var(--sv-radius);
    margin-bottom: 16px;
}
.sv-hero h2 { color: white; font-size: 1.4rem; margin-bottom: 8px; }
.sv-hero p { color: rgba(255,255,255,0.85); margin-bottom: 16px; }

/* Forms (used by contact, login, etc.) */
.sv-form-group { margin-bottom: 16px; }
.sv-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}
.sv-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--sv-border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--sv-card);
    color: var(--sv-text);
}
.sv-input:focus {
    outline: none;
    border-color: var(--sv-primary);
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1);
}
textarea.sv-input { resize: vertical; min-height: 120px; }

/* Footer — anchored above bottom nav on mobile */
.sv-footer {
    position: fixed;
    bottom: calc(52px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.9rem;
    background: var(--sv-bg);
    border-top: 1px solid var(--sv-border);
    z-index: 99;
}
.sv-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.sv-footer-links a {
    color: var(--sv-text-light);
    text-decoration: none;
    font-size: 0.9rem;
}
.sv-footer-links a:hover {
    color: var(--sv-primary);
}

/* Flash messages */
.sv-flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.sv-flash-success { background: #EDF2EB; color: var(--sv-success); border: 1px solid var(--sv-success); }
.sv-flash-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.sv-flash-info { background: #DBEAFE; color: #1D4ED8; border: 2px solid #93C5FD; }

/* ===== Desktop Responsive (768px+) ===== */
@media (min-width: 768px) {
    /* Larger base font for accessibility */
    body { font-size: 1.125rem; }

    /* Header: show desktop nav, style as horizontal bar */
    .sv-header { padding: 14px 32px; }
    .sv-brand { font-size: 1.15rem; flex: 0; }
    .sv-header-nav { display: flex; flex: 1; justify-content: center; gap: 28px; }
    .sv-header-nav a { font-size: 1rem; }
    .sv-header-auth { font-size: 0.95rem; opacity: 1; }

    /* Hide mobile bottom nav */
    .sv-nav { display: none; }

    /* Wider container */
    .sv-container { max-width: 720px; }

    /* Less bottom padding — no bottom nav */
    .sv-page-body { padding-bottom: 24px; }

    /* Larger content text */
    .sv-card h2 { font-size: 1.25rem; }
    .sv-card p { font-size: 1.1rem; }
    .sv-scripture { font-size: 1.3rem; }
    .sv-section-label { font-size: 0.85rem; }
    .sv-hero h2 { font-size: 1.6rem; }
    .sv-hero p { font-size: 1.1rem; }
    .sv-btn { font-size: 1.1rem; padding: 14px 28px; }

    /* Footer — static on desktop (no bottom nav) */
    .sv-footer { position: static; padding: 32px 16px 40px; font-size: 1rem; border-top: none; background: transparent; }
    .sv-page-body { padding-bottom: 24px; }
    .sv-footer-links { gap: 28px; }
    .sv-footer-links a { font-size: 1rem; }
}

/* ===== Large Desktop (1024px+) ===== */
@media (min-width: 1024px) {
    body { font-size: 1.2rem; }
    .sv-container { max-width: 800px; padding: 24px 20px; }
    .sv-card p { font-size: 1.15rem; }
    .sv-scripture { font-size: 1.35rem; line-height: 1.9; }
    .sv-footer-links a { font-size: 1.05rem; }
}

/* Print styles — legal pages, clean output */
@media print {
    .sv-header, .sv-nav, .sv-footer, .sv-flash,
    .sv-sentiment, [data-flash-message] { display: none !important; }
    body { background: white; color: black; font-size: 12pt; line-height: 1.5; }
    .sv-page-body { padding-bottom: 0; }
    .sv-container { max-width: 100%; padding: 0; }
    .sv-card { border: none; padding: 0; margin-bottom: 12pt; break-inside: avoid; }
    .sv-scripture { border-left: 2pt solid #999; background: none; }
    a { color: black; text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
}
