.mtech-radio, .mtech-radio-spacer { --mtech-radio-height: 80px; }
.mtech-radio-spacer { height: calc(var(--mtech-radio-height) + env(safe-area-inset-bottom, 0px)); }

.mtech-radio {
    position: fixed;
    inset: auto 0 var(--mtech-radio-offset, 0px);
    z-index: 9990;
    color: var(--mtech-radio-foreground);
    background: var(--mtech-radio-background);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 26px #0005;
    font-family: "DM Sans", system-ui, sans-serif;
}

.mtech-radio *, .mtech-radio *::before, .mtech-radio *::after { box-sizing: border-box; }
.mtech-radio [hidden] { display: none !important; }

.mtech-radio__layout {
    max-width: 1146px;
    height: var(--mtech-radio-height);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: 100%;
    position: relative;
}

.mtech-radio__layout::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #626262;
}

.mtech-radio[data-playing] .mtech-radio__layout::before { background: var(--mtech-radio-accent); }

.mtech-radio__cover, .mtech-radio__info { grid-area: 1 / 1; }
.mtech-radio__cover {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    background: var(--mtech-radio-accent);
    font-size: 34px;
    z-index: 1;
}
.mtech-radio__cover img { width: 100%; height: 100%; object-fit: cover; }

.mtech-radio__info {
    min-width: 0;
    align-self: center;
    padding-inline: 96px 16px;
    line-height: 1.4;
}

.mtech-radio__station { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.mtech-radio__live { flex: none; color: var(--mtech-radio-foreground); font-weight: 700; }
.mtech-radio__live::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-inline-end: 5px;
    background: var(--mtech-radio-accent);
    vertical-align: 1px;
}
.mtech-radio__station strong, .mtech-radio__program {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.mtech-radio__program { font-size: 15px; margin-top: 3px; }
.mtech-radio__status { color: var(--mtech-radio-foreground); font-size: 12px; }
.mtech-radio__controls {
    grid-area: 1 / 2;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mtech-radio button {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    line-height: 1;
}

.mtech-radio button.mtech-radio__play {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 3px solid var(--mtech-radio-accent);
    border-radius: 50%;
    background: #151515;
    box-shadow: 0 0 0 6px #151515;
    color: var(--mtech-radio-accent);
}

.mtech-radio__play span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-block: 7px solid transparent;
    border-left: 11px solid currentColor;
}

.mtech-radio[data-active] .mtech-radio__play span {
    width: 12px;
    height: 14px;
    margin: 0;
    border: 0;
    border-inline: 4px solid currentColor;
}

.mtech-radio :is(a, button):focus-visible { outline: 2px solid #fff; outline-offset: 5px; }

@media (max-width: 680px) {
    .mtech-radio, .mtech-radio-spacer { --mtech-radio-height: 72px; }
    .mtech-radio__layout { grid-template-columns: minmax(0, 1fr) auto; }
    .mtech-radio__cover { width: 60px; height: 60px; align-self: center; margin-inline-start: 8px; }
    .mtech-radio__info { padding-inline: 78px 8px; }
    .mtech-radio__controls { margin-inline-end: 14px; }
    .mtech-radio__program { font-size: 13px; }
}

.mtech-radio button.mtech-radio__handle {
    position: absolute;
    z-index: 2;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 22px;
    border: 1px solid var(--mtech-radio-accent);
    border-radius: 4px;
    background: var(--mtech-radio-background);
}
.mtech-radio__handle i, .mtech-radio__choose i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: translateY(2px) rotate(45deg);
}
.mtech-radio button.mtech-radio__choose {
    grid-area: 1 / 3;
    align-self: center;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-inline: 8px 16px;
    padding: 10px 12px;
    border-radius: 4px;
    color: var(--mtech-radio-button-text);
    background: var(--mtech-radio-button);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.mtech-radio dialog.mtech-radio__panel {
    position: fixed;
    inset: 0;
    margin: 0 auto;
    padding: 0;
    width: min(1200px, 100% - 48px);
    max-width: none;
    height: 100%;
    max-height: 100%;
    border: 0;
    color: #181818;
    background: #f4f4f4;
    overflow: auto;
    overscroll-behavior: contain;
}
.mtech-radio__panel::backdrop { background: #000c; }
html:has(.mtech-radio__panel[open]) { overflow: hidden; }
.mtech-radio__hero {
    position: relative;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 9vw, 130px);
    padding: 40px 32px;
    color: var(--mtech-radio-foreground);
    background: var(--mtech-radio-background);
}
.mtech-radio button.mtech-radio__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    font-size: 32px;
}
.mtech-radio__art {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    background: var(--mtech-radio-button);
    font-size: 64px;
}
.mtech-radio__art img { width: 100%; height: 100%; object-fit: cover; }
.mtech-radio__detail { text-align: center; min-width: 0; }
.mtech-radio__hero-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 12px 0 28px; }
.mtech-radio__hero-controls .mtech-radio__controls { grid-area: 1 / 2; margin: 0; }
.mtech-radio__hero-controls button.mtech-radio__play { width: 56px; height: 56px; }
.mtech-radio__track {
    height: 5px;
    margin: 0 auto 25px;
    width: 88%;
    border-radius: 8px;
    background: linear-gradient(to right, var(--mtech-radio-accent) var(--mtech-radio-progress, 0%), #555 0);
}
.mtech-radio__headline { display: block; font-size: clamp(20px, 3vw, 26px); line-height: 1.2; }
.mtech-radio__byline { display: flex; justify-content: center; gap: 10px; color: inherit; font-size: 15px; margin-block: 4px; }
.mtech-radio__tabs { display: flex; justify-content: center; gap: 16px; padding: 24px 12px; border-bottom: 1px solid #ddd; }
.mtech-radio__tabs a { padding: 8px 18px; border-radius: 30px; background: #fff; color: #242424; font-size: 12px; text-decoration: none; }
.mtech-radio__tabs a[aria-current] { background: var(--mtech-radio-button); color: var(--mtech-radio-button-text); font-weight: 700; }
.mtech-radio__directory { max-width: 588px; margin: 0 auto; padding: 24px 16px 40px; }
.mtech-radio__group { display: grid; grid-template-columns: minmax(90px, 42%) 1fr; align-items: start; }
.mtech-radio__region { padding: 13px 8px 0 0; text-align: right; font-size: 15px; }
.mtech-radio__group ul { list-style: none; margin: 0; padding: 0; }
.mtech-radio__group li { margin: 0; }
.mtech-radio button.mtech-radio__station-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 8px;
    text-align: left;
    font: inherit;
}
.mtech-radio__station-option .mtech-radio__selected { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; visibility: hidden; }
.mtech-radio__station-option[aria-pressed="true"] .mtech-radio__selected { visibility: visible; background: var(--mtech-radio-button); color: var(--mtech-radio-button-text); }
.mtech-radio__directory :focus-visible, .mtech-radio__tabs :focus-visible { outline: 2px solid var(--mtech-radio-button); outline-offset: 2px; }

@media (max-width: 900px) {
    .mtech-radio__hero { gap: 24px; grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 680px) {
    .mtech-radio__layout { grid-template-columns: minmax(0, 1fr) auto auto; }
    .mtech-radio__layout > .mtech-radio__controls { margin-inline-end: 0; }
    .mtech-radio button.mtech-radio__choose { padding: 7px; max-width: 66px; line-height: 1.1; font-size: 9px; gap: 3px; margin-inline: 10px 8px; }
    .mtech-radio__choose i { display: none; }
    .mtech-radio dialog.mtech-radio__panel { width: 100%; }
    .mtech-radio__hero { grid-template-columns: 1fr; justify-items: center; gap: 8px; padding: 20px 12px; }
    .mtech-radio__art { width: 104px; }
    .mtech-radio__detail { width: 100%; }
    .mtech-radio__hero-controls { margin: 12px 0 16px; }
    .mtech-radio__track { margin-bottom: 12px; }
    .mtech-radio__tabs { padding-block: 14px; }
    .mtech-radio__group { grid-template-columns: minmax(75px, 32%) 1fr; }
}

.mtech-radio__thumb {
    width: 36px;
    height: 36px;
    flex: none;
    object-fit: cover;
    border-radius: 4px;
}

.mtech-radio__thumb--placeholder {
    display: grid;
    place-items: center;
    background: #e5e5e5;
    color: #333;
}
