/* ======================================== CUSTOM AUDIO PLAYER STYLES ======================================== */ /* COLOR CUSTOMIZATION --player-bg: Main player background --player-text: Text and icon colors --accent-color: Progress bar and active states --volume-popup-bg: Volume slider popup background */ * { margin: 0; padding: 0; box-sizing: border-box; } .audio-player-container { background-color: #1F334E; /* MAIN PLAYER BACKGROUND - Change this */ border-radius: 1.5rem; padding: 16px; max-width: 36rem; margin: 0 auto; font-family: var(--font--body-copy); } .player-header { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; } .player-title { font-family: var(--font--body-copy); font-size: var(--_responsive---font-size--base); font-weight: var(--typography--paragraph-semibold); line-height: 1.55; font-style: normal; color: var(--foreground--secondary); margin: 0; } .podcast-subtitle { font-family: var(--font--body-copy); font-size: var(--_responsive---font-size--base); font-weight: var(--typography--paragraph-weight); line-height: 1.55; color: #D1E1F9; margin: 0; } .player-controls { display: flex; align-items: center; gap: 0.75rem; /* Reduced from 1rem to save space */ flex-wrap: nowrap; /* Prevent wrapping above mobile breakpoint */ } .play-button { width: 2rem; height: 2rem; border-radius: 50%; background-color: #FFFFFF; /* PLAY BUTTON BACKGROUND */ border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.1s ease, opacity 0.2s ease; flex-shrink: 0; } .play-button:hover { opacity: 0.9; transform: scale(1.05); } .play-button:active { transform: scale(0.95); } .play-icon, .pause-icon { fill: #1F334E; width: 20px; height: 20px; } .pause-icon { display: none; } .play-button.playing .play-icon { display: none; } .play-button.playing .pause-icon { display: block; } .time-display { color: #D1E1F9; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 45px; flex-shrink: 0; } .progress-container { flex-grow: 1; display: flex; align-items: center; gap: 8px; /* Reduced from 12px to save space */ min-width: 0; /* Allow flex item to shrink below content size */ } .progress-bar { flex: 1 1 0; /* Allow shrinking to zero width if needed */ min-width: 20px; /* Very small minimum to prevent total collapse */ height: 6px; background-color: rgba(255, 255, 255, 0.3); border-radius: 3px; cursor: pointer; position: relative; overflow: hidden; transform: none !important; scale: none !important; } .progress-bar:hover .progress-fill { background-color: #FFFFFF; } .progress-fill { height: 100%; background-color: #4CA077; /* ACCENT COLOR - Progress bar fill */ border-radius: 3px; width: 0%; transition: background-color 0.2s ease; position: relative; } .progress-fill::after { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; background-color: #FFFFFF; /* Progress knob color */ border-radius: 50%; opacity: 0; transition: opacity 0.2s ease; } .progress-bar:hover .progress-fill::after { opacity: 1; } .volume-control { position: relative; flex-shrink: 0; } .volume-button { background: none; border: none; cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s ease; border-radius: 8px; } .volume-button:hover { background-color: rgba(255, 255, 255, 0.1); } .volume-icon { width: 24px; height: 24px; fill: #FFFFFF; } .volume-slider-container { position: absolute; bottom: calc(100% + 4px); /* Reduced gap */ left: 50%; transform: translateX(-50%); /* Darker background for contrast - adjust this color as needed */ background-color: #1A2838; padding: 16px 12px; border-radius: 24px; /* Add a subtle border for definition on light backgrounds */ border: 1px solid rgba(255, 255, 255, 0.1); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s ease, visibility 0.2s ease; /* Enhanced shadow for better visibility */ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2); z-index: 10; /* Prevent cutoff by ensuring it's contained properly */ min-height: 152px; /* 120px bar + 32px padding */ } /* Create an invisible bridge between button and slider */ .volume-slider-container::before { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 8px; /* Bridge height to fill the gap */ background: transparent; } .volume-control:hover .volume-slider-container, .volume-slider-container:hover { opacity: 1; visibility: visible; pointer-events: all; } .volume-bar { width: 6px; height: 120px; background-color: rgba(255, 255, 255, 0.3); /* Increased to match progress bar */ border-radius: 3px; cursor: pointer; position: relative; } .volume-bar:hover .volume-fill { background-color: #FFFFFF; } .volume-fill { position: absolute; bottom: 0; width: 100%; background-color: #D1E1F9; border-radius: 3px; height: 100%; transition: background-color 0.2s ease; } .volume-fill::after { content: ''; position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; background-color: #FFFFFF; border-radius: 50%; opacity: 0; transition: opacity 0.2s ease; } .volume-bar:hover .volume-fill::after { opacity: 1; } /* Loading state */ .loading .progress-fill { background: linear-gradient(90deg, rgba(209, 225, 249, 0.4) 0%, #D1E1F9 50%, rgba(209, 225, 249, 0.4) 100%); background-size: 200% 100%; animation: loading 1.5s ease-in-out infinite; } @keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } /* Responsive adjustments */ @media (max-width: 480px) { .audio-player-container { padding: 16px; /* Slightly reduced padding on mobile */ } /* Reduce gaps on mobile to save space */ .player-controls { gap: 0.5rem; } .progress-container { gap: 6px; } /* Hide volume slider popup on very small screens */ .volume-slider-container { display: none; } }