.mre-audio-card,
.mre-audio-card * {
    box-sizing: border-box;
}

.mre-audio-card {
    display: flex;
    width: 100%;
    min-height: 96px;
    border-radius: 6px;
    padding: 4px;
    background: #fff;
    color: #222;
    box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.mre-audio-card+.mre-audio-card {
    margin-top: 1em;
}

.mre-audio-thumbnail {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    min-width: 80px;
    margin: 8px;
    background: transparent;
    object-fit: cover;
    aspect-ratio: 1/1;
    border-radius: 3px;
}

.mre-audio-thumbnail.placeholder {
    background: var(--ghost-accent-color);
}

.mre-audio-thumbnail.placeholder svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.mre-audio-player-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    --seek-before-width: 0%;
    --volume-before-width: 100%;
    --buffered-width: 0%;
}

.mre-audio-title {
    width: 100%;
    margin: 8px 0 0 0;
    padding: 8px 12px;
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15em;
    background: transparent;
}

.mre-audio-player {
    display: flex;
    flex-grow: 1;
    align-items: center;
    padding: 8px 12px;
}

.mre-audio-current-time {
    min-width: 38px;
    padding: 0 4px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1em;
    white-space: nowrap;
}

.mre-audio-time {
    width: 56px;
    color: #ababab;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1em;
    white-space: nowrap;
}

.mre-audio-duration {
    padding: 0 4px;
}

.mre-audio-play-icon,
.mre-audio-pause-icon {
    position: relative;
    bottom: 1px;
    padding: 0px 4px 0 0;
    font-size: 0;
    background: transparent;
}

.mre-audio-hide {
    display: none !important;
}

.mre-audio-play-icon svg,
.mre-audio-pause-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.mre-audio-seek-slider {
    flex-grow: 1;
    margin: 0 4px;
}

@media (max-width: 640px) {
    .mre-audio-seek-slider {
        display: none;
    }
}

.mre-audio-playback-rate {
    min-width: 37px;
    padding: 0 4px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1em;
    text-align: left;
    background: transparent;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .mre-audio-playback-rate {
        padding-left: 8px;
    }
}

.mre-audio-mute-icon,
.mre-audio-unmute-icon {
    position: relative;
    bottom: -1px;
    padding: 0 4px;
    font-size: 0;
    background: transparent;
}

@media (max-width: 640px) {
    .mre-audio-mute-icon,
    .mre-audio-unmute-icon  {
        margin-left: auto;
    }
}

.mre-audio-mute-icon svg,
.mre-audio-unmute-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mre-audio-volume-slider {
    width: 80px;
}

@media (max-width: 400px) {
    .mre-audio-volume-slider {
        display: none;
    }
}

.mre-audio-seek-slider::before {
    content: "";
    position: absolute;
    left: 0;
    width: var(--seek-before-width) !important;
    height: 4px;
    cursor: pointer;
    background-color: currentColor;
    border-radius: 2px;
}

.mre-audio-volume-slider::before {
    content: "";
    position: absolute;
    left: 0;
    width: var(--volume-before-width) !important;
    height: 4px;
    cursor: pointer;
    background-color: currentColor;
    border-radius: 2px;
}

/* Resetting browser styles
/* --------------------------------------------------------------- */

.mre-audio-player-container input[type=range] {
    position: relative;
    -webkit-appearance: none;
    background: transparent;
}

.mre-audio-player-container input[type=range]:focus {
    outline: none;
}

.mre-audio-player-container input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
}

.mre-audio-player-container input[type=range]::-ms-track {
    cursor: pointer;
    border-color: transparent;
    color: transparent;
    background: transparent;
}

.mre-audio-player-container button {
    display: flex;
    align-items: center;
    border: 0;
    cursor: pointer;
}

.mre-audio-player-container input[type="range"] {
    height: auto;
    padding: 0;
    border: 0;
}

/* Chrome & Safari styles
/* --------------------------------------------------------------- */

.mre-audio-player-container input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(124, 139, 154, 0.25);
    border-radius: 2px;
}

.mre-audio-player-container input[type="range"]::-webkit-slider-thumb {
    position: relative;
    box-sizing: content-box;
    width: 13px;
    height: 13px;
    margin: -5px 0 0 0;
    border: 0;
    cursor: pointer;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,0.24);
}

.mre-audio-player-container input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* Firefox styles
/* --------------------------------------------------------------- */

.mre-audio-player-container input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(124, 139, 154, 0.25);
    border-radius: 2px;
}

.mre-audio-player-container input[type="range"]::-moz-range-progress {
    background: currentColor;
    border-radius: 2px;
}

.mre-audio-player-container input[type="range"]::-moz-range-thumb {
    box-sizing: content-box;
    width: 13px;
    height: 13px;
    border: 0;
    cursor: pointer;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,0.24);
}

.mre-audio-player-container input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.2);
}

/* Edge & IE styles
/* --------------------------------------------------------------- */

.mre-audio-player-container input[type="range"]::-ms-track {
    width: 100%;
    height: 3px;
    border: solid transparent;
    color: transparent;
    cursor: pointer;
    background: transparent;
}

.mre-audio-player-container input[type="range"]::-ms-fill-lower {
    background: #fff;
}

.mre-audio-player-container input[type="range"]::-ms-fill-upper {
    background: currentColor;
}

.mre-audio-player-container input[type="range"]::-ms-thumb {
    box-sizing: content-box;
    width: 13px;
    height: 13px;
    border: 0;
    cursor: pointer;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,0.24);
}

.mre-audio-player-container input[type="range"]:active::-ms-thumb {
    transform: scale(1.2);
}

/* Upgrade-to-listen CTA (shown to free members in place of the paid-only player)
/* --------------------------------------------------------------- */

.mre-audio-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 24px;
    border-radius: 6px;
    background: #fff;
    color: #222;
    box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.mre-audio-cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ghost-accent-color, #15171a);
}

.mre-audio-cta-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.mre-audio-cta-body {
    flex-grow: 1;
}

.mre-audio-cta-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2em;
}

.mre-audio-cta-text {
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.4em;
    color: #626d79;
}

.mre-audio-cta-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 5px;
    background: var(--ghost-accent-color, #15171a);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1em;
    text-decoration: none;
    white-space: nowrap;
}

.mre-audio-cta-button:hover {
    opacity: 0.92;
}

/* Force the button label to the card's background color and no underline, overriding
   the theme's .gh-content a link styles (which otherwise make the text accent-colored
   and underlined). Higher specificity so it wins. */
.mre-audio-cta a.mre-audio-cta-button,
.mre-audio-cta a.mre-audio-cta-button:hover,
.mre-audio-preview a.mre-audio-cta-button,
.mre-audio-preview a.mre-audio-cta-button:hover {
    color: #fff;
    text-decoration: none;
}

/* Preview card: preview player + upgrade prompt stacked in one card (shown to free members)
/* --------------------------------------------------------------- */

.mre-audio-preview {
    width: 100%;
}

/* The theme's content-spacing rules force a 48px margin on .kg-card and on the element
   after it (higher specificity), which pushes the eyebrow, player and CTA apart. Override
   with !important so the wrapper controls spacing (matches the tighter intended layout). */
.mre-audio-preview .kg-card.mre-audio-card {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.mre-audio-preview-eyebrow {
    margin: 0 0 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #15171a);
}

.mre-audio-preview-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px !important;
}

.mre-audio-preview-text {
    flex-grow: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4em;
    color: #626d79;
}

@media (max-width: 640px) {
    .mre-audio-preview-cta {
        flex-wrap: wrap;
    }

    .mre-audio-preview-cta .mre-audio-cta-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .mre-audio-cta {
        flex-wrap: wrap;
    }

    .mre-audio-cta-button {
        width: 100%;
        justify-content: center;
    }
}
