/**
 * IMON Station — Base frontend styles.
 *
 * Shared reset and utilities used by all templates.
 * Template-specific styles are in templates/{slug}/style.css.
 *
 * @package IMON_Station
 */

/* Reset for station pages */
.imon-station-page *,
.imon-station-page *::before,
.imon-station-page *::after {
    box-sizing: border-box;
}

.imon-station-page {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Visually hidden (screen reader only) */
.imon-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Loading spinner */
.imon-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: imon-spin 0.6s linear infinite;
}

@keyframes imon-spin {
    to { transform: rotate(360deg); }
}

/* Stream player: native audio fallback.
   Shown by default; hidden when player.js loads and takes over. */
.imon-audio-fallback {
    width: 100%;
    margin-top: 10px;
}

.imon-audio-hidden {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Live badge: dot-only mode — hide text, keep dot + padding compact.
   Uses !important to override template-specific .imon-live-badge styles
   that load after this base stylesheet. */
.imon-live-badge.imon-badge-dot-only {
    padding: 8px !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    gap: 0 !important;
    min-width: 0 !important;
    line-height: 0 !important;
}

.imon-live-badge.imon-badge-dot-only #imon-live-text {
    display: none !important;
}

.imon-live-badge.imon-badge-dot-only .imon-live-dot {
    width: 10px !important;
    height: 10px !important;
}

/* Donate widget */
.imon-donate-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.imon-donate-stripe,
.imon-donate-paypal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s;
}

.imon-donate-stripe {
    background: #635bff;
}

.imon-donate-stripe:hover {
    background: #4b45c6;
    color: #fff;
}

.imon-donate-paypal {
    background: #0070ba;
}

.imon-donate-paypal:hover {
    background: #005ea6;
    color: #fff;
}

.imon-donate-stripe svg,
.imon-donate-paypal svg {
    flex-shrink: 0;
}

/* Videos widget */
.imon-videos-grid {
    display: grid;
    gap: 16px;
}

.imon-video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
}

.imon-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.imon-video-facade {
    cursor: pointer;
}

.imon-video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imon-video-thumb-fallback {
    background: linear-gradient(145deg, #3e2a12 0%, #151a2d 100%);
}

.imon-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

.imon-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    border: 0;
    border-radius: 12px;
    padding: 0;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.imon-video-play svg {
    display: block;
}

.imon-video-facade:hover .imon-video-play,
.imon-video-facade:focus-within .imon-video-play {
    transform: translate(-50%, -50%) scale(1.06);
    background: #ff0000;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.imon-video-play:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Footer: extra bottom margin on mobile for chat widget clearance. */
@media (max-width: 768px) {
    .imon-footer {
        margin-bottom: 30px;
    }
}
