
@font-face {
    font-family: 'Byker';
    src: url('../font/BykerTrial-Regular-BF6476b31497907.otf') format('opentype'),
         url('../font/Byker W00 Regular.woff2') format('woff2'),
         url('../font/Byker W00 Regular.woff') format('woff'),
         url('../font/Byker W00 Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Byker';
    src: url('../font/BykerTrial-Bold-BF6476b3148e7b2.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Byker';
    src: url('../font/BykerTrial-Light-BF6476b314aa535.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Byker';
    src: url('../font/BykerTrial-Medium-BF6476b314979ba.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #0038b8;
    --color-yellow-logo: #ffdd00;
    --secondary-color: rgb(96,94,94);
    --yellow-color: #f59e0b;
    --text-alt: rgb(47,46,46);
    --light-grey: #EEEEEE75;
    --font-family: 'helvetica-w01-light', sans-serif;
    --font-heading: 'Byker';
    --background-color: #f4f4f4;
}

.byker-light {
  font-family: 'Byker', sans-serif;
  font-weight: 300;
  color: var(--primary-color);
}

.byker-regular {
  font-family: 'Byker', sans-serif;
  font-weight: 700;
  color: var(--primary-color);
}

html {
    background-color: white;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

p, a{
    font-family: var(--font-family);
    color: var(--primary-color);
}

h1 {    
    font-size: 56px;
    font-weight: 600;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

.heading1 { font-size: 32px; line-height: 1.1; }
.heading2 { font-size: 18px; line-height: 1.15; }
.heading3 { font-size: 14px; line-height: 1.2; }

h2 {
    font-size: 36px;
}

p {
    color: var(--secondary-color); 
}

p, a {
    font-size: 16px;
    font-weight: 100;   
}

a {
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

.content {
    width: 75%;
    margin: 0 auto; 
    padding: 1em;
}

hr {
    border: 0.1px solid var(--secondary-color);
    opacity: 0.5;
    margin: 1em;
}

.right-align {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1em;
}

/* Floating Audio Player Styles - disabled */
.floating-audio-player { display: none !important; }

/* When floating player is visible, reserve space at bottom via body padding (set by JS) */
/* Note: JS sets padding-bottom inline on body when this class is present */
/* Keeping this class referenced ensures specificity without empty rules */
body.has-floating-player { padding-bottom: inherit; }

.floating-player-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.2s ease-out;
}

.floating-player-content {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 24px;
}

.floating-player-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.floating-player-info {
    flex-shrink: 0;
    min-width: 200px;
}

.floating-player-currently-playing {
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.floating-player-info {
    text-align: left;
    margin-left: 16px;
}

.floating-player-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-player-guest {
    font-family: var(--font-family);
    font-size: 12px;
    color: var(--secondary-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-player-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-player-audio {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.floating-player-audio audio {
    width: 100%;
    height: 36px;
}

.floating-player-audio audio::-webkit-media-controls-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.floating-player-controls {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.floating-player-stop,
.floating-player-focus,
.floating-player-transcript {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    position: relative;
    padding: 6px 10px;
    white-space: nowrap;
    min-width: 70px;
}


.floating-player-stop:hover,
.floating-player-focus:hover,
.floating-player-transcript:hover {
    background: white;
    color: var(--primary-color);
}

.floating-player-stop:hover .action-img,
.floating-player-focus:hover .action-img,
.floating-player-transcript:hover .action-img {
    filter: none;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-audio-player { display: none !important; }
    
    .floating-player-content {
        padding: 16px;
        flex-direction: column;
        gap: 16px;
        max-width: none;
    }
    
    .floating-player-left {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .floating-player-info {
        min-width: auto;
        text-align: center;
        margin-left: 0;
        order: 1;
    }
    
    .floating-player-currently-playing {
        font-size: 12px;
    }
    
    .floating-player-title {
        font-size: 14px;
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }
    
    .floating-player-guest {
        font-size: 12px;
    }
    
    .floating-player-audio {
        width: 100%;
        max-width: none;
        order: 2;
    }
    
    .floating-player-audio audio {
        height: 56px;
        width: 100%;
    }
    
    .floating-player-controls {
        order: 3;
        justify-content: center;
        gap: 12px;
    }
    
    .floating-player-stop,
    .floating-player-focus,
    .floating-player-transcript {
        padding: 8px 12px;
        font-size: 11px;
        height: 36px;
        min-width: fit-content;
        justify-content: center;
        border-radius: 6px;
    }
    
    /* Ensure touch targets are large enough for mobile */
    .floating-player-stop,
    .floating-player-focus,
    .floating-player-transcript {
        touch-action: manipulation;
    }
    
    /* Make progress bar more visible on mobile */
    .floating-player-progress {
        height: 4px;
    }
}

/* Transcript header for episode cards */
.transcript-header {
    display: none;
    justify-content: flex-end;
    margin-bottom: 8px;
    padding: 8px 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.transcript-header.show {
    display: flex;
    opacity: 1;
    justify-content: flex-start;
    flex-direction: column;
    margin-top: 1.5em;
}

/* Confidence toggle switch container */
.confidence-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.confidence-toggle-label {
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--secondary-color);
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}

/* Toggle switch styles */
.confidence-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.confidence-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.confidence-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.confidence-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.confidence-checkbox:checked + .confidence-slider {
    background-color: var(--primary-color);
}

.confidence-checkbox:checked + .confidence-slider:before {
    transform: translateX(20px);
}

.confidence-checkbox:focus + .confidence-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

/* Hide confidence highlighting when toggled off */
.transcript-content.hide-confidence .confidence-high,
.transcript-content.hide-confidence .confidence-medium,
.transcript-content.hide-confidence .confidence-low {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    display: inline !important;
    margin: 0 !important;
}

/* Confidence legend */
.confidence-legend {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 8px;
}

.confidence-legend.show {
    max-height: 120px;
}

.confidence-legend-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.confidence-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.confidence-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border-left: 3px solid;
}

.confidence-legend-color.high {
    background-color: #d4edda;
    border-left-color: #28a745;
}

.confidence-legend-color.medium {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}

.confidence-legend-color.low {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

/* Transcript slide animations */
.transcript-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.transcript-content.show {
    display: block;
    opacity: 1;
}

/* Episode bottom actions */
.episode-bottom-actions {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    margin-top: 16px;
}

.bottom-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

.bottom-action-btn:hover {
    color: var(--primary-color);
    border: none;
    box-shadow: none;
}

.action-img {
    width: 16px;
    height: 16px;
}

/* Cite dropdown */
.cite-button-container {
    position: relative;
    display: inline-block;
}

.cite-dropdown {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 100px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cite-dropdown.show {
    opacity: 1;
    visibility: visible;
}

.cite-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: background 0.2s ease;
}

.cite-option:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.cite-option:first-child {
    border-radius: 6px 6px 0 0;
}

.cite-option:last-child {
    border-radius: 0 0 6px 6px;
}

.cite-option:only-child {
    border-radius: 6px;
}

/* Responsive adjustments for transcript header */
@media (max-width: 768px) {
    .transcript-header {
        justify-content: center;
        margin-bottom: 6px;
        padding: 6px 0;
    }
    
    .confidence-toggle-container {
        gap: 6px;
    }
    
    .confidence-toggle-label {
        font-size: 13px;
    }
    
    .cite-button-container {
        display: flex !important;
    }
    
    .confidence-switch {
        width: 40px;
        height: 22px;
    }
    
    .confidence-slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
    }
    
    .confidence-checkbox:checked + .confidence-slider:before {
        transform: translateX(18px);
    }
    
    .episode-bottom-actions {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: flex-start;
    }
}