/* StartPray Light Theme - Based on Figma Design */
:root {
    /* Brand Colors */
    --primary: #13A1D9;
    /* Updated to Figma Brand Blue */
    --primary-hover: #0E89B8;
    --secondary: #727272;
    /* Slate 500 for secondary text */

    /* Functional Colors */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;

    /* Backgrounds */
    --bg-page: #F3F4F6;
    /* Light Gray Background */
    --bg-surface: #FFFFFF;
    /* White Cards */
    --bg-input: #F8FAFC;
    /* Light Blue/Gray Input */

    /* Text */
    --text-main: #1E293B;
    --text-primary: #1E293B;
    /* Alias for --text-main */
    --text-secondary: #727272;
    /* Mid gray from Figma */
    --text-muted: #9CA3AF;
    /* Light gray for placeholders and minor labels */
    --text-inverted: #FFFFFF;

    /* Borders */
    --border: #E2E8F0;
    /* Slate 200 */
    --border-focus: #38BDF8;
    /* Sky Blue 400 */

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    /* 8px */
    --radius-md: 0.75rem;
    /* 12px */
    --radius-lg: 1rem;
    /* 16px */
    --radius-full: 9999px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    letter-spacing: -0.02em;
    /* Figma specifies -2% letter spacing */
    min-height: 100vh;
}

/* Layout Container */
.container {
    display: block;
    max-width: 1000px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4dvh, 3.5rem) 2rem clamp(1rem, 2dvh, 2rem);
}



/* Header */
header {
    text-align: center;
    padding-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo {
    max-height: 90px;
    width: auto;
    display: block;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Navigation Tabs & Result Tabs Shared Styles */
.tabs,
.result-tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border);
    /* Continuous bottom line */
    justify-content: center;
    /* Center tabs */
}

.tab-btn,
.result-tab-btn {
    padding: 1rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    /* Figma: 14px */
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    /* Thinner border */
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover,
.result-tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active,
.result-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
}

/* YouTube URL Input */
.youtube-url-section {
    margin-bottom: 0;
}

.youtube-url-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.youtube-url-input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.youtube-url-input::placeholder {
    color: var(--text-muted);
}

/* Upload Divider */
.upload-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

/* Upload Area */
.upload-area {
    background-color: var(--bg-input);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2rem;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background-color: #F0F9FF;
    /* Very light blue */
}

.upload-placeholder svg {
    stroke: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-placeholder p {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-info {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    opacity: 0.7;
}

#statusText {
    font-size: 17.22px;
    /* Figma specific size */
    color: var(--text-main);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    transition: border 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    /* Tighter radius */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
    width: 100%;
    /* Full width action */
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #F8FAFC;
}

/* btn-sm modifier */
.btn.btn-sm {
    padding: 0.45rem 1.1rem;
    font-size: 0.8rem;
}

/* Botão copiar */
.btn-copy {
    background-color: #ffffff;
    border: 1.5px solid var(--primary);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.btn-copy:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* Botão WhatsApp */
.btn-whatsapp {
    background-color: #ffffff;
    border: 1.5px solid var(--primary);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.btn-whatsapp:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* Results Section */
.results-section {
    margin-top: 2rem;
}

.results-section h2 {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: left;
}

.result-tabs {
    margin-bottom: 2rem;
    justify-content: space-between;
    gap: 1rem;
}

/* Result Header */
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.result-header h2 {
    margin-bottom: 0;
}

/* Result Content Area */
.result-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    /* No padding here, content manages it */
}

.result-panel {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.result-panel.active {
    display: block;
}

.result-text {
    white-space: pre-wrap;
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.05rem;
}

.markdown-content {
    white-space: normal;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    color: var(--text-main);
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
    line-height: 1.4;
}

.markdown-content h1 { font-size: 1.4rem; }
.markdown-content h2 { font-size: 1.2rem; }
.markdown-content h3 { font-size: 1.05rem; }

.markdown-content p {
    margin-bottom: 0.6rem;
}

.point-field {
    display: flex;
    gap: 0.5rem;
    margin: 0.25rem 0 0.25rem 1rem;
    line-height: 1.6;
    font-size: 1rem;
}

.point-label {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.point-label::after {
    content: ':';
}

.point-content {
    color: var(--text-main);
}

/* Newsletter subject line: blue label sem indentação */
#newsletterText .point-field {
    margin-left: 0;
}

/* Result Actions (Copy buttons) */
.result-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.result-actions__btns {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

/* ─── Feedback Widget (Inline) ───────────────────────────────────────────── */
.fb-feedback {
    display: flex;
    flex-direction: column;
    gap: 5px;
    user-select: none;
}

.fb-feedback__label {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.fb-feedback__buttons {
    display: flex;
    gap: 6px;
}

.fb-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    transition: border-color .2s, background .2s, transform .15s, box-shadow .2s;
}

.fb-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), stroke .15s;
}

.fb-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(19, 161, 217, .15);
    transform: translateY(-1px);
}

.fb-btn:hover svg {
    transform: scale(1.15);
    stroke: var(--primary);
}

.fb-btn--like.fb-btn--active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 3px 14px rgba(19, 161, 217, .3);
}

.fb-btn--dislike.fb-btn--active {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 3px 14px rgba(239, 68, 68, .25);
}

.fb-btn--active svg {
    stroke: #ffffff;
    transform: scale(1.05);
}

.fb-btn--dim {
    opacity: .3;
    pointer-events: none;
    transform: none !important;
}

@keyframes fb-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.2); }
    70%  { transform: scale(.94); }
    100% { transform: scale(1); }
}

.fb-btn--pop { animation: fb-pop .32s cubic-bezier(.34, 1.56, .64, 1) forwards; }

.fb-feedback__thanks {
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(3px);
    transition: opacity .35s, transform .35s;
    min-height: 14px;
    line-height: 14px;
}

.fb-feedback__thanks--show {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Bars Section */
.status-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.progress-section {
    width: 100%;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    border-radius: 99px;
    transition: width 0.4s ease;
}

.progress-percent {
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* Floating Chat Widget */

.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
    background-color: var(--primary-hover);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
}

.chat-window.hidden {
    display: flex !important;
    /* Keep display flex but hide visually */
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

.chat-widget.hidden {
    display: none;
    /* Hide entire widget until needed */
}

/* Chat Header */
.chat-header {
    padding: 1rem 1.5rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.chat-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 0.5rem;
}

.chat-close-btn:hover {
    color: var(--text-main);
}

/* Chat Content Styles (Reused/Adapted) */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-surface);
}

.chat-input-container {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    font-size: 0.9rem;
}

.btn-chat {
    background: var(--primary);
    color: white;
    padding: 0 1rem;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Messages */
.chat-message {
    margin-bottom: 0.75rem;
    max-width: 85%;
    font-size: 0.9rem;
}

.chat-message.user {
    margin-left: auto;
    text-align: right;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    display: inline-block;
    text-align: left;
    line-height: 1.5;
}

/* Bubbles Colors */
.chat-message.user .chat-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
    background: var(--bg-input);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 2rem);
        bottom: 80px;
        right: 0;
        /* Align right relative to widget container */
        height: 60vh;
    }

    .chat-widget {
        right: 1rem;
        bottom: 1rem;
    }
}

/* Devotional Styles */
.day-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.day-btn {
    width: auto;
    height: auto;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    /* Rounded rectangle */
    border: 1px solid var(--border);
    /* Thinner border */
    background: #E0F2FE;
    /* Light blue background (like screenshot) */
    color: var(--primary);
    /* Blue text */
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.day-btn:hover {
    background: #BAE6FD;
    transform: translateY(-1px);
}

.day-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.4);
}

#devotionalTitle {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.devotional-text {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.devotional-verse,
.devotional-question {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-top: 0.6rem;
}

/* Clips carousel styles (horizontal indicators) */
.clips-carousel {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.clips-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.clip-indicator {
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    flex: 0 0 auto;
    padding: 0 0.5rem;
}

.clip-indicator.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(14, 165, 233, 0.12);
}

.clip-display {
    margin-top: 1rem;
}

/* Utility */
.hidden {
    display: none !important;
}

.spinner {
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }

    .chat-section {
        position: static;
        height: 500px;
        margin-top: 2rem;
    }
}

/* Upload Instructions Layout */
.upload-instructions {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4rem;
    margin-top: 3.5rem;
    margin-bottom: 1rem;
}

.instruction-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 140px;
}

.instruction-icon {
    stroke: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.9;
}

.instruction-step p {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .upload-instructions {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
}

/* Avalie a Ferramenta */
.rate-section {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}

.rate-link {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s;
    margin-bottom: 0.5rem;
}

.rate-link:hover {
    color: var(--primary-hover);
    opacity: 0.85;
}

.rate-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* "Gerar novo sermão" — CTA pill, auto-width, centered */
.btn-new-sermon {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
    width: auto;
    padding: 0.875rem 2.75rem;
    border-radius: var(--radius-full);
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-new-sermon:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(19, 161, 217, 0.28);
    transform: translateY(-1px);
}

.btn-new-sermon svg {
    flex-shrink: 0;
}
/* Email Modal */
.email-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.email-modal-overlay.hidden {
  display: none;
}

.email-modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
}

.email-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.5rem;
}

.email-modal-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.email-modal-input {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s;
}

.email-modal-input:focus {
  border-color: var(--border-focus);
}

.email-modal-input.invalid {
  border-color: var(--danger);
}

.email-modal-error {
  font-size: 0.8rem;
  color: var(--danger);
}

.email-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.email-modal-cancel {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.email-modal-cancel:hover {
  background: var(--bg-input);
}

.email-modal-confirm {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--text-inverted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.email-modal-confirm:hover {
  background: var(--primary-hover);
}

/* ─── Novo Design: Input Section (sp-*) ─────────────────────────────────── */

/* Fundo atualizado */
:root {
    --bg-page: #EEF6FF;
}

/* Header */
header.sp-header {
    text-align: left;
    display: block;
    padding-top: 0;
    margin-bottom: 0;
    align-items: unset;
    justify-content: unset;
    flex-direction: unset;
}

header.sp-header .logo {
    display: block;
    max-width: clamp(140px, 36%, 240px);
    height: auto;
    margin-bottom: clamp(14px, 2.5dvh, 36px);
}

/* Wrapper estreito (max 600px centrado) */
.sp-narrow-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

/* Headline */
.sp-headline {
    font-size: clamp(22px, 3.8dvh, 50px);
    font-weight: 800;
    color: #0C1B2E;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin: 0 0 clamp(18px, 2.8dvh, 40px);
}

.sp-headline-gradient {
    background: linear-gradient(90deg, #0EA5E9 0%, #38BDF8 50%, #7DD3FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Steps */
.sp-steps {
    display: flex;
    align-items: flex-start;
    margin-bottom: clamp(14px, 2dvh, 32px);
}

.sp-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sp-step-track {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: clamp(6px, 1dvh, 14px);
}

.sp-step-line {
    flex: 1;
    height: 1.5px;
}

.sp-step-line--fade-in  { background: linear-gradient(to right, transparent, #0EA5E9); }
.sp-step-line--solid    { background: #0EA5E9; }
.sp-step-line--light    { background: #BAE6FD; }
.sp-step-line--fade-out { background: linear-gradient(to right, #BAE6FD, transparent); }

.sp-step-circle {
    width: clamp(34px, 4.5dvh, 54px);
    height: clamp(34px, 4.5dvh, 54px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-step-circle--active   { background: #0EA5E9; }
.sp-step-circle--inactive { background: #fff; border: 1.5px solid #BAE6FD; }

.sp-step-label {
    font-size: clamp(11px, 1.4dvh, 15px);
    font-weight: 600;
    color: #0C1B2E;
    margin-bottom: 3px;
    line-height: 1.3;
}

.sp-step-sublabel {
    font-size: clamp(10px, 1.2dvh, 13px);
    color: #94A3B8;
    line-height: 1.4;
}

/* Card principal */
.sp-card {
    background: #fff;
    border: 1px solid #DBEAFE;
    border-radius: clamp(16px, 2dvh, 28px);
    padding: clamp(18px, 2.8dvh, 40px);
}

/* Grupos de campo */
.sp-field-group {
    margin-bottom: 0;
}

.sp-field-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.sp-label-text {
    font-size: clamp(10px, 1.3dvh, 14px);
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #94A3B8;
}

.sp-required {
    font-size: 13px;
    font-weight: 700;
    color: #0EA5E9;
    line-height: 1;
}

/* Input com ícone à esquerda */
.sp-input-row {
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    height: clamp(44px, 6dvh, 72px);
    transition: border-color 0.2s;
    margin-bottom: clamp(12px, 1.8dvh, 24px);
}

.sp-input-row:focus-within {
    border-color: #38BDF8;
}

.sp-input-row input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: clamp(14px, 1.8dvh, 20px);
    color: #0C1B2E;
    padding: 0 16px;
    outline: none;
    min-width: 0;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    height: 100%;
    border-radius: 14px;
}

.sp-input-row input::placeholder {
    color: #A8BFCC;
}

/* Variante que cresce (usada na linha de URL) */
.sp-input-row--grow {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

/* Divisor dentro do card */
.sp-card-divider {
    height: 1px;
    background: #F1F5F9;
    margin: 4px 0 clamp(12px, 1.8dvh, 24px);
}

/* Linha URL + ou + Upload */
.sp-url-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: clamp(12px, 1.8dvh, 24px);
}

.sp-or-text {
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
    flex-shrink: 0;
}

/* Botão de upload compacto */
.sp-upload-trigger {
    height: clamp(44px, 6dvh, 72px);
    padding: 0 clamp(14px, 2vw, 22px);
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    font-size: clamp(13px, 1.6dvh, 18px);
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
    font-family: inherit;
}

.sp-upload-trigger:hover {
    border-color: #0EA5E9;
    background: #F0F9FF;
}

/* Tags de conteúdo */
.sp-tags-label {
    font-size: clamp(12px, 1.4dvh, 16px);
    color: #94A3B8;
    line-height: 1.6;
    margin: 0 0 clamp(8px, 1dvh, 14px);
}

.sp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: clamp(6px, 0.8dvh, 12px);
}

.sp-tag {
    font-size: clamp(11px, 1.3dvh, 15px);
    padding: clamp(3px, 0.4dvh, 6px) clamp(10px, 1.2dvh, 16px);
    border-radius: 6px;
}

.sp-tag--active {
    background: #EFF6FF;
    color: #0284C7;
    font-weight: 500;
}

.sp-tag--soon {
    background: #F1F5F9;
    color: #CBD5E1;
    font-weight: 400;
}

/* Botão CTA principal */
.sp-cta-btn {
    width: 100%;
    height: clamp(52px, 7dvh, 80px);
    background: #0EA5E9;
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: clamp(15px, 2.2dvh, 26px);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    letter-spacing: -0.01em;
    margin-top: clamp(14px, 2dvh, 28px);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
}

.sp-cta-btn:hover:not(:disabled) {
    background: #0284C7;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
}

.sp-cta-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Rodapé da tela de input */
footer.sp-footer {
    margin-top: clamp(16px, 2.5dvh, 40px);
    padding-top: clamp(12px, 1.5dvh, 24px);
    border-top: 1px solid #DBEAFE;
    text-align: center;
}

footer.sp-footer span {
    font-size: clamp(11px, 1.3dvh, 14px);
    color: #94A3B8;
}

/* Tab-content sem padding lateral no novo layout */
#upload-tab.tab-content {
    padding: 0;
}

/* Card de processamento (substitui o sp-card principal durante o loading) */
.sp-processing-card {
    text-align: center;
}

.sp-processing-title {
    font-size: clamp(15px, 2dvh, 20px);
    font-weight: 700;
    color: #0C1B2E;
    letter-spacing: -0.01em;
    margin-bottom: clamp(4px, 0.8dvh, 8px);
}

.sp-processing-subtitle {
    font-size: clamp(12px, 1.4dvh, 15px);
    color: #94A3B8;
    margin-bottom: clamp(16px, 2.5dvh, 32px);
}

.sp-progress-section {
    text-align: left;
    width: 100%;
}

.sp-progress-item {
    margin-bottom: clamp(10px, 1.5dvh, 18px);
}

.sp-progress-item:last-child {
    margin-bottom: 0;
}

.sp-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(11px, 1.3dvh, 14px);
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.sp-progress-percent {
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.sp-progress-bar-track {
    height: 6px;
    background: #DBEAFE;
    border-radius: 99px;
    overflow: hidden;
}

.sp-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0EA5E9, #38BDF8);
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* Responsivo */
@media (max-width: 640px) {
    .sp-headline {
        font-size: 20px;
    }

    .sp-step-label {
        font-size: 10px;
    }

    .sp-step-sublabel {
        font-size: 9px;
    }

    .sp-upload-trigger {
        padding: 0 12px;
        font-size: 12px;
    }
}

/* ─── Tela de Resultados (res-*) ────────────────────────────────────────── */

/* Seção raiz dos resultados — sem card externo */
.res-section {
    padding-bottom: 3rem;
}

/* Cabeçalho: logo + botão Gerar novo */
.res-page-header {
    max-width: 840px;
    margin: 0 auto clamp(28px, 4dvh, 48px);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.res-logo {
    max-height: 36px;
    width: auto;
    display: block;
}

.res-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 38px;
    padding: 0 20px;
    background: transparent;
    border: 1.5px solid #BAE6FD;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    color: #0284C7;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.res-new-btn:hover {
    background: #EFF6FF;
    border-color: #0EA5E9;
}

/* Headline de resultados */
.res-headline {
    font-size: clamp(22px, 4dvh, 30px);
    font-weight: 800;
    color: #0C1B2E;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 4px;
}

.res-subheadline {
    font-size: clamp(18px, 3dvh, 24px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 clamp(20px, 3dvh, 32px);
}

/* Card de fonte (YouTube / upload) */
.res-source-card {
    background: #fff;
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    min-width: 0;
}

.res-source-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #EFF6FF;
}

.res-source-info {
    min-width: 0;
}

.res-source-title {
    font-size: 13px;
    font-weight: 700;
    color: #0C1B2E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.res-source-url {
    font-size: 12px;
    color: #94A3B8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chip tabs */
.res-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.res-chip {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    background: #fff;
    color: #94A3B8;
    border: 1.5px solid #E2E8F0;
    line-height: 1;
}

.res-chip.active {
    background: #0EA5E9;
    color: #fff;
    border-color: #0EA5E9;
}

.res-chip:hover:not(.active) {
    border-color: #BAE6FD;
    color: #0284C7;
}

/* Wrapper mais largo para a tela de resultados */
#resultsSection .sp-narrow-wrapper {
    max-width: 840px;
}

/* Sem card externo no result-content */
#resultsSection .result-content {
    background: none;
    border-radius: 0;
    box-shadow: none;
}

/* Painéis como cards individuais */
#resultsSection .result-panel {
    padding: 0;
    animation: none;
}

.res-card {
    background: #fff;
    border: 1px solid #DBEAFE;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 0;
}

/* Cabeçalho do card */
.res-card-header {
    padding: 18px 22px 16px;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.res-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0C1B2E;
}

/* Corpo do card */
.res-card-body {
    padding: 22px;
    font-size: 14px;
    color: #334155;
    line-height: 1.8;
}

.res-card-body .result-text {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
}

/* Rodapé do card */
.res-card-footer {
    padding: 16px 22px 22px;
    border-top: 1px solid #F1F5F9;
}

/* Rodapé dividido: feedback à esquerda, botões à direita */
.res-card-footer--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Botões de ação (copiar / whatsapp) */
.res-card-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.res-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none;
}

.res-btn--copy {
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    color: #0284C7;
}

.res-btn--copy:hover {
    background: #0EA5E9;
    color: #fff;
    border-color: #0EA5E9;
}

/* Feedback de copiado */
.res-btn--copy.copied {
    background: #0EA5E9;
    color: #fff;
    border-color: #0EA5E9;
}

.res-btn--whatsapp {
    background: #DCFCE7;
    border: 1px solid #86EFAC;
    color: #16A34A;
}

.res-btn--whatsapp:hover {
    background: #22C55E;
    color: #fff;
    border-color: #22C55E;
}

/* Day selector no cabeçalho do card devocional */
.res-card-header .day-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.res-card-header .day-btn {
    padding: 5px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    color: #94A3B8;
    border: 1.5px solid #E2E8F0;
    cursor: pointer;
    text-transform: none;
    box-shadow: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.res-card-header .day-btn:hover {
    border-color: #BAE6FD;
    color: #0284C7;
    transform: none;
    background: transparent;
}

.res-card-header .day-btn.active {
    background: #EFF6FF;
    color: #0284C7;
    border-color: #BAE6FD;
    box-shadow: none;
}

/* Versículo e Reflexão do devocional */
.res-devotional-meta {
    background: #F8FAFC;
    border-radius: 12px;
    padding: 11px 15px;
    font-size: 13px;
    color: #64748B;
    margin-top: 14px;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Card de avaliação */
.res-rate-card {
    background: #fff;
    border: 1px solid #BAE6FD;
    border-radius: 20px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.res-rate-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-rate-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #EFF6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.res-rate-title {
    font-size: 14px;
    font-weight: 700;
    color: #0C1B2E;
    margin-bottom: 2px;
}

.res-rate-sub {
    font-size: 12px;
    color: #94A3B8;
}

.res-rate-action {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 22px;
    background: #0EA5E9;
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s;
    flex-shrink: 0;
}

.res-rate-action:hover {
    background: #0284C7;
}

/* Responsivo mobile */
@media (max-width: 480px) {
    .res-page-header {
        padding: 0 16px;
    }

    .res-chips {
        gap: 6px;
    }

    .res-chip {
        padding: 8px 14px;
        font-size: 12px;
    }

    .res-card-header {
        padding: 14px 16px 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .res-card-body {
        padding: 16px;
    }

    .res-card-footer {
        padding: 12px 16px 18px;
    }

    .res-card-footer--split {
        flex-direction: column;
        align-items: flex-start;
    }

    .res-rate-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .res-rate-action {
        width: 100%;
        justify-content: center;
    }
}

/* ─── Cell Guide ─────────────────────────────────────────────────────────────── */
.res-empty-state {
    text-align: center;
    color: var(--text-muted, #888);
    padding: 2rem;
    margin: 0;
}

.res-btn--download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #d1d5db);
    background: transparent;
    color: var(--text-primary, #111);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}
.res-btn--download:hover {
    background: var(--bg-hover, #f3f4f6);
}

.cell-guide-content {
    padding: 4px 0;
}
.cell-guide-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text-primary, #111);
}
.cell-guide-theme {
    font-size: 0.9rem;
    color: var(--text-muted, #555);
    margin: 0 0 16px;
}
.cell-guide-section {
    margin-bottom: 16px;
}
.cell-guide-section h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cell-guide-section p,
.cell-guide-section ul {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-primary, #111);
}
.cell-guide-section ul {
    padding-left: 1.25rem;
}
.cell-guide-section li {
    margin-bottom: 4px;
}
