body {
    font-family: Arial, sans-serif;
    margin: 2em;
}

.sermons-container {
    margin-top: 1em;
}

.sermon-header {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1em;
    padding: 0.75em;
    background-color: #f5f5f5;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.sermon-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1em;
    padding: 0.75em;
    border-bottom: 1px solid #ddd;
}

.sermon-item:hover {
    background-color: #f9f9f9;
}

.sermon-date,
.sermon-topic,
.sermon-speaker {
    padding: 0;
}

.sermon-summary {
    margin-top: 0.5em;
    color: #444;
    font-size: 0.97em;
}

.sermon-tags {
    margin-top: 0.5em;
}

.tag {
    color: #888;
    background: #f0f0f0;
    border-radius: 3px;
    padding: 2px 6px;
    margin-right: 4px;
}

a {
    text-decoration: none;
    color: #0066cc;
}

a:hover {
    text-decoration: underline;
}

.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 1em;
    background-color: #f0f8ff;
    border-top: 2px solid #0066cc;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.audio-player.active {
    display: block;
}

body.player-active {
    padding-bottom: 120px;
}

.audio-player audio {
    width: 100%;
    margin-top: 0.5em;
}

.audio-player .player-info {
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #333;
}

.close-player {
    float: right;
    cursor: pointer;
    font-size: 1.2em;
    color: #666;
    font-weight: bold;
}

.close-player:hover {
    color: #000;
}

.play-button {
    cursor: pointer;
    color: #0066cc;
    font-weight: bold;
}

.play-button:hover {
    color: #004499;
}

.playing {
    background-color: #e6f3ff !important;
    border-left: 4px solid #0066cc;
}

.playing .play-button {
    color: #ce0000;
}

.playing.paused .play-button:before {
    content: '⏵';
    margin-right: 0.5em;
}

.playing .play-button:before {
    content: '⏸';
    margin-right: 0.5em;
}

.play-button:before {
    content: '▶';
    margin-right: 0.5em;
}

.filter-container {
    margin: 1em 0;
    padding: 1em;
    background-color: #f9f9f9;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: center;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.filter-container label {
    font-weight: bold;
    font-size: 0.9em;
}

.filter-container select,
.filter-container input {
    padding: 0.5em;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 300px;
}

.filter-container select[multiple] {
    height: auto;
    min-height: 2.5em;
    max-height: 150px;
    overflow-y: auto;
}

.filter-container select[multiple] option {
    padding: 0.25em 0.5em;
}

.filter-container select[multiple] option:checked {
    background-color: #0066cc;
    color: white;
}

.podcast-info {
    margin: 2em 0;
    padding: 1.5em;
    background-color: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    text-align: center;
}

.podcast-info h3 {
    margin: 0 0 0.5em 0;
    color: #0066cc;
}

.podcast-info p {
    margin: 0.5em 0;
    color: #666;
}

.podcast-link {
    display: inline-block;
    padding: 0.75em 1.5em;
    background-color: #0066cc;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 0.5em;
    transition: background-color 0.3s;
}

.podcast-link:hover {
    background-color: #004499;
    text-decoration: none;
}

/* Transcript fullscreen styles */
.transcript-fullscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 2000;
    overflow: hidden;
}

.transcript-fullscreen.active {
    display: flex;
    flex-direction: column;
}

body.transcript-active {
    overflow: hidden;
}

.transcript-header {
    background: #f5f5f5;
    padding: 1.5em 2em;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.transcript-header h3 {
    margin: 0;
    color: #0066cc;
    font-size: 1.4em;
}

.transcript-close {
    font-size: 2.5em;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0.2em;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transcript-close:hover {
    color: #000;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}

.transcript-body {
    flex: 1;
    overflow-y: auto;
    padding: 1em 2em 2em 2em;
}

.transcript-line {
    padding: 0.75em;
    margin: 0.25em 0;
    cursor: pointer;
    border-radius: 6px;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.transcript-line:hover {
    background-color: #f0f8ff;
    border-left-color: #0066cc;
}

.transcript-line.current {
    background-color: #e6f3ff;
    border-left-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.transcript-timestamp {
    font-size: 0.85em;
    color: #666;
    margin-right: 0.75em;
    font-weight: bold;
    display: inline-block;
    min-width: 60px;
}

.custom-multiselect {
    position: relative;
    width: 300px;
}

.multiselect-button {
    width: 100%;
    padding: 0.5em;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.multiselect-button:hover {
    border-color: #bbb;
}

.multiselect-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multiselect-arrow {
    margin-left: 0.5em;
    font-size: 0.8em;
    color: #666;
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 3px 3px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1200;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
}

.multiselect-dropdown.show {
    display: block;
}

.multiselect-option {
    display: flex;
    align-items: center;
    padding: 0.5em;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.multiselect-option:last-child {
    border-bottom: none;
}

.multiselect-option:hover {
    background-color: #f9f9f9;
}

.multiselect-option input[type="checkbox"] {
    margin-right: 0.5em;
    width: auto;
}

.multiselect-option span {
    flex: 1;
}

.no-results {
    text-align: center;
    padding: 2em;
    color: #666;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 1em 0;
}

.no-results p {
    margin: 0.5em 0;
}

.no-results p:first-child {
    font-weight: bold;
    font-size: 1.1em;
}

@media (min-width: 769px) {
    .filter-container {
        position: sticky;
        top: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        background-color: #f9f9f9;
    }
}

@media (max-width: 768px) {
    body {
        margin: 0.5em;
        font-size: 16px;
    }

    h1 {
        font-size: 1.6em;
        margin-bottom: 0.75em;
    }

    .sermon-header {
        display: none;
    }

    .sermon-item {
        display: block;
        border: 1px solid #ccc;
        margin-bottom: 0.75em;
        border-radius: 8px;
        background-color: #fff;
    }

    /* Group date and speaker side by side */
    .sermon-item .sermon-date-speaker-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1em;
        margin-bottom: 0.5em;
    }

    .sermon-date,
    .sermon-speaker {
        display: inline;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .sermon-date:before,
    .sermon-speaker:before {
        display: none;
    }

    .sermon-topic {
        display: block;
        margin-bottom: 0.5em;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
        margin: 0.75em 0;
        padding: 0.75em;
    }

    .filter-group {
        width: 100%;
    }

    .filter-container label {
        font-size: 1em;
        margin-bottom: 0.25em;
    }

    .filter-container select,
    .filter-container input {
        min-width: auto;
        width: 100%;
        font-size: 18px;
        padding: 0.5em;
        min-height: 44px;
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .filter-container select[multiple] {
        min-height: 44px;
        max-height: 120px;
    }

    .play-button {
        display: block;
        font-size: 17px;
        word-wrap: break-word;
        display: flex;
        align-items: center;
    }

    .sermon-topic small {
        margin-top: 0.25em;
        display: block;
        margin-left: 0 !important;
    }

    .audio-player {
        padding: 0.75em;
    }

    .audio-player.active {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    body.player-active {
        padding-bottom: 100px;
    }

    .player-info {
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 0.5em;
    }

    .close-player {
        font-size: 22px;
        padding: 0.25em;
        margin-top: -0.25em;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .podcast-info {
        margin: 1.5em 0;
        padding: 1em;
    }

    .podcast-link {
        padding: 0.75em 1.25em;
        font-size: 16px;
    }

    .transcript-header {
        padding: 1em;
    }

    .transcript-header h3 {
        font-size: 1.2em;
    }

    .transcript-body {
        padding: 1em;
    }

    .transcript-line {
        padding: 1em;
        font-size: 16px;
    }

    .transcript-timestamp {
        display: block;
        margin-bottom: 0.5em;
        margin-right: 0;
        min-width: auto;
    }

    .transcript-close {
        font-size: 2em;
        min-width: 44px;
        min-height: 44px;
    }

    .custom-multiselect {
        width: 100%;
        position: relative;
    }

    .multiselect-button {
        font-size: 18px;
        padding: 0.5em;
        min-height: 44px;
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .multiselect-dropdown {
        max-height: 150px;
        z-index: 1200;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        border: 1px solid #ccc;
        border-top: none;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        -webkit-overflow-scrolling: touch;
    }

    .multiselect-option {
        padding: 0.75em 0.5em;
        font-size: 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .multiselect-option input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 0.75em;
        flex-shrink: 0;
        -webkit-appearance: checkbox;
        -moz-appearance: checkbox;
        appearance: checkbox;
    }

    .multiselect-option:active {
        background-color: #e6f3ff;
    }
}

@media (max-width: 480px) {
    body {
        margin: 0.5em;
        font-size: 16px;
    }

    h1 {
        font-size: 1.5em;
        text-align: center;
        margin-bottom: 0.5em;
    }

    .filter-container {
        padding: 0.5em;
        margin: 0.5em 0;
    }

    .sermon-item {
        margin-bottom: 0.5em;
        padding: 0.5em;
    }

    .sermon-date,
    .sermon-topic,
    .sermon-speaker {
        padding-bottom: 0.5em;
    }

    .play-button {
        font-size: 16px;
        padding: 0.5em 0 0.25em 0;
    }

    .transcript-header {
        padding: 0.75em;
    }

    .transcript-header h3 {
        font-size: 1.1em;
    }

    .transcript-body {
        padding: 0.75em;
    }
}

