/**
 * Voice Stories Player Styles
 */

/* Player Container */
.vs-story-player {
    max-width: 800px;
    margin: 0 auto 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.vs-story-player:focus {
    outline: 2px solid #4a90d9;
    outline-offset: 2px;
}

/* Audio Player Section */
.vs-audio-player {
    padding: 25px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.vs-player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Play Button */
.vs-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4a90d9 0%, #3b7dc4 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.vs-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.5);
}

.vs-play-btn::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.vs-play-btn.vs-playing::before {
    width: 16px;
    height: 20px;
    border: none;
    background: linear-gradient(to right, #fff 0%, #fff 35%, transparent 35%, transparent 65%, #fff 65%, #fff 100%);
    margin-left: 0;
}

/* Progress Container */
.vs-progress-container {
    flex: 1;
}

.vs-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.vs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90d9 0%, #67b8f7 100%);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 3px;
}

.vs-progress-bar:hover .vs-progress-fill {
    background: linear-gradient(90deg, #5a9fe8 0%, #77c8ff 100%);
}

/* Time Display */
.vs-time {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-family: monospace;
}

/* Playback Speed */
.vs-playback-speed {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.vs-playback-speed:focus {
    outline: none;
    border-color: #4a90d9;
}

/* Hidden Native Audio */
.vs-audio {
    display: none;
}

/* Transcript Section */
.vs-transcript-section {
    padding: 25px;
}

.vs-transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.vs-transcript-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.vs-transcript-hint {
    font-size: 13px;
    color: #888;
}

/* Interactive Transcript */
.vs-transcript {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    line-height: 2;
    font-size: 17px;
    color: #444;
    scroll-behavior: smooth;
}

.vs-transcript::-webkit-scrollbar {
    width: 8px;
}

.vs-transcript::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 4px;
}

.vs-transcript::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
}

.vs-transcript::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Transcript Paragraphs */
.vs-paragraph {
    margin: 0 0 1.2em 0;
    text-indent: 0;
}

.vs-paragraph:last-child {
    margin-bottom: 0;
}

/* Word Spans */
.vs-word {
    display: inline;
    padding: 2px 0;
    border-radius: 3px;
    transition: background-color 0.15s, color 0.15s;
    cursor: pointer;
}

.vs-word:hover {
    background: #e5e7eb;
}

.vs-word-active {
    background: linear-gradient(135deg, #4a90d9 0%, #3b7dc4 100%);
    color: #fff;
    padding: 2px 4px;
    margin: 0 -2px;
}

/* Story Metadata */
.vs-story-meta {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.vs-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.vs-meta-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.vs-meta-label {
    font-weight: 600;
    color: #444;
}

/* Archive Grid */
.vs-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Story Card */
.vs-story-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.vs-story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.vs-story-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.vs-story-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.vs-story-card-title a {
    color: #fff;
    text-decoration: none;
}

.vs-story-card-title a:hover {
    text-decoration: underline;
}

.vs-story-card-meta {
    font-size: 13px;
    opacity: 0.8;
}

.vs-story-card-body {
    padding: 20px;
}

.vs-story-card-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.vs-story-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vs-story-card-duration {
    font-size: 13px;
    color: #888;
}

.vs-story-card-link {
    color: #4a90d9;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.vs-story-card-link:hover {
    text-decoration: underline;
}

/* Filter/Category Navigation */
.vs-category-nav {
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.vs-category-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vs-category-nav li a {
    display: inline-block;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.2s;
}

.vs-category-nav li a:hover,
.vs-category-nav li.current a {
    background: #4a90d9;
    color: #fff;
}

/* Single Story Page */
.vs-single-story {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.vs-story-header {
    margin-bottom: 30px;
}

.vs-story-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    color: #1a1a2e;
}

.vs-story-byline {
    font-size: 16px;
    color: #666;
}

.vs-story-byline strong {
    color: #333;
}

/* No Stories Message */
.vs-no-stories {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.vs-no-stories h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Photo Gallery */
.vs-story-photos {
    margin: 30px 0;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.vs-story-photos h3,
.vs-story-documents h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.vs-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.vs-photo-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.vs-photo-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.vs-photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Documents List */
.vs-story-documents {
    margin: 30px 0;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.vs-story-documents .vs-document-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vs-story-documents .vs-document-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.vs-story-documents .vs-document-item:hover {
    background: #e9ecef;
}

.vs-story-documents .vs-document-item:last-child {
    margin-bottom: 0;
}

.vs-story-documents .dashicons {
    color: #4a90d9;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.vs-story-documents .vs-document-item a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.vs-story-documents .vs-document-item a:hover {
    color: #4a90d9;
}

.vs-story-documents .vs-doc-meta {
    color: #888;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .vs-story-player {
        margin: 0 10px 20px;
    }

    .vs-audio-player {
        padding: 20px;
    }

    .vs-player-controls {
        flex-wrap: wrap;
    }

    .vs-transcript {
        font-size: 15px;
        max-height: 250px;
    }

    .vs-story-meta {
        flex-direction: column;
        gap: 12px;
    }

    .vs-stories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .vs-story-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .vs-play-btn {
        width: 48px;
        height: 48px;
    }

    .vs-play-btn::before {
        border-width: 8px 0 8px 14px;
    }
}
