/**
 * Sermon Paragraph Player Styles (Guest Mode)
 *
 * Styling for read-only paragraph playback interface.
 *
 * @author Claude Sonnet 4.5
 * @version 1.0.0
 */

/* Paragraphs with Audio Timestamps */
p.parText.has-audio-timestamp {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding-left: 2.5rem;
    border-left: 3px solid transparent;
}

p.parText.has-audio-timestamp:hover {
    background-color: rgba(25, 135, 84, 0.05);
    border-left-color: #198754;
}

/* Play Icon */
.paragraph-play-icon {
    position: absolute;
    left: 0.5rem;
    top: 0.25rem;
    color: #198754;
    font-size: 1.25rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    pointer-events: none;
}

p.parText.has-audio-timestamp:hover .paragraph-play-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Timestamp Badge */
.paragraph-timestamp-badge {
    display: inline-block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #198754;
    background: rgba(25, 135, 84, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    vertical-align: middle;
}

p.parText.has-audio-timestamp:hover .paragraph-timestamp-badge {
    opacity: 1;
}

/* Active Paragraph (Currently Playing) */
p.parText.paragraph-active {
    background-color: rgba(13, 110, 253, 0.08);
    border-left-color: #0d6efd;
}

p.parText.paragraph-active .paragraph-play-icon {
    color: #0d6efd;
    opacity: 1;
}

p.parText.paragraph-active .paragraph-timestamp-badge {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
    opacity: 1;
}

/* Playing Animation (Click Feedback) */
p.parText.paragraph-playing {
    background-color: rgba(25, 135, 84, 0.15);
    border-left-color: #198754;
    animation: paragraphPulse 0.6s ease-out;
}

@keyframes paragraphPulse {
    0% {
        background-color: rgba(25, 135, 84, 0.3);
        transform: translateX(5px);
    }
    100% {
        background-color: rgba(25, 135, 84, 0.15);
        transform: translateX(0);
    }
}

/* Info Banner */
.sermon-paragraph-info-banner {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.4s ease-out;
    position: relative;
    z-index: 999;
}

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

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

.sermon-paragraph-info-banner .info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sermon-paragraph-info-banner .info-content > span {
    flex: 1;
}

.sermon-paragraph-info-banner .btn-close-info {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sermon-paragraph-info-banner .btn-close-info:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    p.parText.has-audio-timestamp {
        padding-left: 2rem;
    }

    .paragraph-play-icon {
        font-size: 1rem;
        left: 0.25rem;
    }

    .paragraph-timestamp-badge {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
        opacity: 1;
        width: fit-content;
    }

    .sermon-paragraph-info-banner .info-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .sermon-paragraph-info-banner .btn-close-info {
        align-self: flex-end;
    }
}

/* Touch Devices - Always Show Badge */
@media (hover: none) {
    .paragraph-timestamp-badge {
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    .paragraph-play-icon,
    .paragraph-timestamp-badge,
    .sermon-paragraph-info-banner {
        display: none !important;
    }

    p.parText.has-audio-timestamp {
        padding-left: 0;
        border-left: none;
        cursor: default;
    }
}

/* Dark Theme Support */
.dark-theme p.parText.has-audio-timestamp:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

.dark-theme .paragraph-play-icon {
    color: #28a745;
}

.dark-theme .paragraph-timestamp-badge {
    color: #28a745;
    background: rgba(40, 167, 69, 0.15);
}

.dark-theme p.parText.paragraph-active {
    background-color: rgba(13, 110, 253, 0.12);
}

.dark-theme p.parText.paragraph-active .paragraph-play-icon {
    color: #4d9fff;
}

.dark-theme p.parText.paragraph-active .paragraph-timestamp-badge {
    color: #4d9fff;
    background: rgba(77, 159, 255, 0.15);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    p.parText.has-audio-timestamp {
        border-left-width: 4px;
    }

    .paragraph-play-icon {
        font-weight: bold;
    }

    .paragraph-timestamp-badge {
        border: 2px solid currentColor;
        opacity: 1;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    p.parText.has-audio-timestamp,
    .paragraph-play-icon,
    .paragraph-timestamp-badge,
    .sermon-paragraph-info-banner {
        transition: none;
        animation: none;
    }

    p.parText.paragraph-playing {
        animation: none;
    }
}

/* Focus Styles for Keyboard Navigation */
p.parText.has-audio-timestamp:focus {
    outline: 2px solid #198754;
    outline-offset: 2px;
}

p.parText.has-audio-timestamp:focus-visible {
    background-color: rgba(25, 135, 84, 0.05);
    border-left-color: #198754;
}

/* Loading State */
.sermon-content.loading p.parText.has-audio-timestamp {
    pointer-events: none;
    opacity: 0.6;
}
