bethaus-app/static/audioplayer.css
2026-01-23 20:31:15 +00:00

171 lines
3.7 KiB
CSS

.audio-player-container {
background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
backdrop-filter: blur(10px) saturate(135%);
-webkit-backdrop-filter: blur(10px) saturate(135%);
border-radius: 14px;
box-shadow:
0 12px 30px rgba(15, 23, 42, 0.22),
inset 0 1px 0 rgba(255, 255, 255, 0.24);
border: 2px solid rgba(255, 255, 255, 0.55);
outline: 1px solid rgba(12, 18, 32, 0.18); /* slightly stronger edge so front/back separate */
outline-offset: -1px;
background-clip: padding-box; /* keep border separate from glass */
padding: 12px 12px;
width: min(600px, 100%);
display: none;
color: #1f2937;
margin-left: 8px;
margin-right: 8px;
overflow: hidden; /* keep the glass blur clean at the edges */
}
/* Now Playing Info */
.now-playing-info {
margin-top: 5px;
font-size: 15px;
color: #1f2937;
text-align: center;
}
.audio-player {
--control-size: 3.4em;
--space: 0.5em;
}
.controls {
display: flex;
align-items: center;
width: 100%;
gap: var(--space); /* ensures spacing between controls */
color: #1f2937;
}
/* Make the slider container fill the available space and stack its children vertically */
.slider {
flex: 1;
display: flex;
flex-direction: column;
}
/* The range input takes the full width of its container */
.timeline {
-webkit-appearance: none;
width: 100%;
height: 0.5em;
background-color: #e6edf7;
border-radius: 5px;
background-size: 0% 100%;
background-image: linear-gradient(90deg, #0b1220, #0f172a);
background-repeat: no-repeat;
appearance: none;
outline: none;
}
/* Slider Thumb Styling */
/* WebKit browsers (Chrome, Safari) */
.timeline::-webkit-slider-thumb {
-webkit-appearance: none;
width: 1em;
height: 1em;
border-radius: 50%;
background-color: #0f172a;
cursor: pointer;
border: 2px solid #0b1220;
outline: none;
}
/* Firefox */
.timeline::-moz-range-thumb {
width: 1em;
height: 1em;
border-radius: 50%;
background-color: #0f172a;
cursor: pointer;
border: 2px solid #0b1220;
outline: none;
}
/* Internet Explorer and Edge */
.timeline::-ms-thumb {
width: 1em;
height: 1em;
border-radius: 50%;
background-color: #0f172a;
cursor: pointer;
border: 2px solid #0b1220;
outline: none;
}
/* Remove default track styling */
.timeline::-webkit-slider-runnable-track,
.timeline::-moz-range-track,
.timeline::-ms-track {
-webkit-appearance: none;
box-shadow: none;
border: none;
background: transparent;
}
/* Style the time info (positioned right below the slider) */
.now-playing-info {
text-align: center;
font-size: 1em;
margin-top: 0.25em;
}
.player-button,
.sound-button {
width: var(--control-size);
height: var(--control-size);
background: transparent;
border: none;
border-radius: 50%;
box-shadow: none;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background-color 0.15s ease, transform 0.1s ease;
padding: 0;
line-height: 1;
overflow: visible;
}
.player-button:hover,
.sound-button:hover {
background: rgba(15, 23, 42, 0.08);
transform: translateY(-1px);
}
.player-button:active,
.sound-button:active {
transform: translateY(0);
background: rgba(15, 23, 42, 0.12);
}
.player-button:focus-visible,
.sound-button:focus-visible {
outline: 2px solid rgba(20, 33, 61, 0.85);
outline-offset: 2px;
}
.player-button svg,
.sound-button svg {
width: var(--control-size);
height: var(--control-size);
display: block;
pointer-events: none;
}
.player-button svg path,
.sound-button svg path {
fill: var(--dark-background);
}
.timeline::-webkit-slider-thumb,
.timeline::-moz-range-thumb,
.timeline::-ms-thumb {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}