/**
 * Sermon Public View Styles
 *
 * Styles for public sermon reading interface
 *
 * @version 1.0.0
 */

/* Sermon Header */
.sermon-header-full {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sermon-header-full .bg-gradient {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.sermon-header-full .card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
}

/* Sermon Content */
.sermon-content {
    background: #f8f9fa;
}

.sermon-text-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sermon-text-card .card-body {
    font-size: 18px;
    line-height: 1.8;
    color: #212529;
}

/* Paragraph Styling */
.parText {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.parNum {
    display: inline-block;
    min-width: 35px;
    font-weight: 600;
    color: #28a745;
    margin-right: 8px;
    user-select: none;
}

.bibleText {
    font-style: italic;
    color: #6c757d;
    margin: 1rem 0;
    padding-left: 2rem;
    border-left: 3px solid #28a745;
}

.songText {
    font-style: italic;
    color: #0d6efd;
    margin: 1rem 0;
    padding-left: 2rem;
}

.questionText {
    font-weight: 600;
    color: #dc3545;
    margin-top: 1.5rem;
}

.comment {
    color: #6c757d;
    font-size: 0.95em;
}

.italicText {
    font-style: italic;
}

.bibleComment {
    color: #6c757d;
    font-size: 0.9em;
}

.refText {
    font-size: 0.9em;
    color: #6c757d;
}

/* Reading Controls */
.reading-controls {
    position: sticky;
    top: 60px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

/* Sermon Stats */
.sermon-stats {
    font-size: 0.95rem;
}

/* Footer Actions */
.sermon-footer .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Sermon Metadata */
.sermon-metadata .badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sermon-text-card .card-body {
        font-size: 16px;
        padding: 2rem 1.5rem;
    }

    .parText {
        text-align: left;
    }

    .sermon-header-full h1 {
        font-size: 2rem;
    }

    .sermon-stats {
        font-size: 0.85rem;
    }

    /* Sticky header responsive */
    .sermon-sticky-header {
        padding: 6px 12px;
    }

    .sermon-sticky-code {
        font-size: 11px;
        padding: 3px 8px;
    }

    .sermon-sticky-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .sermon-text-card .card-body {
        font-size: 15px;
        padding: 1.5rem 1rem;
    }

    .bibleText,
    .songText {
        padding-left: 1rem;
    }
}

/* Dark Theme Support */
body.dark-theme .sermon-content {
    background: #1a1a1a;
}

body.dark-theme .sermon-text-card {
    background: #2d2d2d;
}

body.dark-theme .sermon-text-card .card-body {
    color: #e0e0e0;
}

body.dark-theme .parNum {
    color: #4ade80;
}

body.dark-theme .reading-controls {
    background: #2d2d2d;
    color: #e0e0e0;
}

/* Sticky Sermon Header (for sermons without audio) */
.sermon-sticky-header {
    position: fixed;
    top: 56px; /* Below navbar */
    left: 0;
    right: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1030;
    padding: 10px 16px;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.sermon-sticky-header.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: slideDownHeader 0.3s ease;
}

@keyframes slideDownHeader {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sermon-sticky-info {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    overflow: hidden;
}

.sermon-sticky-code {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.sermon-sticky-title {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Dark Theme Support for Sticky Header */
body.dark-theme .sermon-sticky-header {
    background: #2d2d2d;
    border-bottom-color: #4a5568;
}

body.dark-theme .sermon-sticky-title {
    color: #e2e8f0;
}

/* Print Styles */
@media print {
    .sermon-header-full,
    .reading-controls,
    .sermon-footer,
    .language-switcher,
    .btn,
    .audio-player,
    .sermon-sticky-header {
        display: none !important;
    }

    .sermon-text-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .sermon-text-card .card-body {
        font-size: 12pt;
        line-height: 1.6;
    }

    .parText {
        page-break-inside: avoid;
    }
}
