/* ===== OnAir2 Radio Station Theme Override =====
   Light "white + light blue" radio station look,
   modeled after the QantumThemes OnAir2 demo theme. */

:root {
    --default-font: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --heading-font: 'Poppins', sans-serif;
    --nav-font: 'Poppins', sans-serif;
    --brand-font: 'Poppins', sans-serif;
}

/* ===== Body ===== */
body {
    background-color: var(--bg) !important;
    background-image: radial-gradient(ellipse at 50% 0%, rgba(var(--primary-rgb), 0.10), transparent 62%) !important;
    background-size: 100% 100%;
    color: #24344d;
    background-attachment: fixed !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-deep);
}

.letsbounce {
    animation: none !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 76, 129, 0.06);
}

::-webkit-scrollbar-thumb {
    background: #bcd3ec;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== Navbar ===== */
.site-header {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(15, 76, 129, 0.12);
    box-shadow: 0 2px 14px rgba(15, 76, 129, 0.10);
    padding: 12px 0 !important;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.site-header .navbar-brand {
    font-family: var(--brand-font);
    font-weight: 600;
    color: var(--primary-deep);
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

.site-header .navbar-brand i {
    color: var(--primary);
}

.navbar-logo {
    height: 34px;
}

.navbar-nav .nav-item a {
    font-family: var(--nav-font);
    font-size: 12.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #2c3e5e;
    padding: 8px 13px !important;
    border-radius: 4px;
}

.navbar-nav .nav-item a i {
    color: var(--primary);
    margin-right: 6px;
}

.navbar-nav .nav-item a:hover,
.navbar-nav .nav-item.active a {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.10);
}

.site-header .navbar-toggler {
    background: rgba(var(--primary-rgb), 0.10);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
}

.site-header .navbar-toggler i {
    color: var(--primary);
}

/* Right-side CTA button in the navbar */
.navbar-cta {
    margin-left: 18px;
    flex-shrink: 0;
}

.req-btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(180deg, var(--primary-2) 0%, var(--primary) 100%);
    color: #fff !important;
    font-family: var(--heading-font);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    padding: 9px 18px;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.req-btn-nav:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5);
    transform: translateY(-1px);
}

@media (max-width: 991px) {
    .navbar-cta {
        margin-left: 0;
        margin-top: 12px;
        padding-bottom: 6px;
    }
    .req-btn-nav {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Hero ===== */
.main_header {
    background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg) 45%, #d4e7fb 100%);
    min-height: 480px;
}

.hero-overlay {
    background: linear-gradient(180deg, rgba(234, 243, 252, 0.15) 0%, rgba(234, 243, 252, 0.55) 100%);
}

.hero-logo {
    max-width: 280px;
    filter: drop-shadow(0 8px 28px rgba(var(--primary-rgb), 0.30));
}

.hero-heading-row {
    gap: 8px;
}

.hero-heading-row h2 {
    font-family: var(--heading-font);
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.hero-heading-row .shine-text {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: var(--primary-deep);
    color: var(--primary-deep);
    font-size: 3.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.15;
}

.hero-heading-row .shine-text:after {
    display: none;
}

.hero-heading-row .legends-text {
    font-family: var(--heading-font);
    color: rgba(13, 71, 161, 0.65);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-marquee h4 {
    font-family: 'Roboto', sans-serif !important;
    color: rgba(13, 71, 161, 0.75);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* ===== Header video (OnAir2 style) ===== */
.main_header.has-header-video {
    background: #000;
    min-height: 640px;
}

.main_header.has-header-video .hero-overlay {
    display: block;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, calc(var(--header-video-overlay, 0.6) * 0.3)) 0%, rgba(0, 0, 0, calc(var(--header-video-overlay, 0.6) * 1)) 100%);
}

.main_header.has-header-video .hero-logo {
    filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.6));
}

.main_header.has-header-video .hero-heading-row h2 {
    color: var(--primary-2);
}

.main_header.has-header-video .hero-heading-row .shine-text {
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

.main_header.has-header-video .hero-heading-row .legends-text {
    color: rgba(255, 255, 255, 0.75);
}

.main_header.has-header-video .hero-marquee h4 {
    color: rgba(255, 255, 255, 0.85);
}

/* ===== Header photo (OnAir2 style) ===== */
.main_header.has-header-photo {
    background: #000;
    min-height: 640px;
}

.main_header.has-header-photo .hero-overlay {
    display: block;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.main_header.has-header-video.has-header-photo .hero-overlay {
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, calc(var(--header-video-overlay, 0.6) * 0.35)) 0%, rgba(0, 0, 0, calc(var(--header-video-overlay, 0.6) * 1)) 100%);
}

.main_header.has-header-photo .hero-heading-row h2 {
    color: var(--primary-2);
}

.main_header.has-header-photo .hero-heading-row .shine-text {
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

.main_header.has-header-photo .hero-heading-row .legends-text {
    color: rgba(255, 255, 255, 0.75);
}

.main_header.has-header-photo .hero-marquee h4 {
    color: rgba(255, 255, 255, 0.85);
}

/* Default logo badge */
.logo {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 0 55px rgba(var(--primary-rgb), 0.35);
}

.logo-inner {
    color: #fff;
}

/* ===== Section titles (card headers) ===== */
.title-divider {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: var(--primary-deep);
    color: var(--primary-deep);
    font-family: var(--heading-font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.title-divider > span,
.title-divider > a {
    color: var(--primary-deep);
    -webkit-text-fill-color: var(--primary-deep);
}

.title-divider::before,
.title-divider::after {
    border-bottom: 1px solid rgba(15, 76, 129, 0.15);
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
}

.title-divider > span i,
.title-divider > a i {
    color: var(--primary);
}

.about-bg-card .title-divider {
    color: #87ceeb;
    -webkit-text-fill-color: #87ceeb;
}

.about-bg-card .title-divider > span {
    color: #87ceeb;
    -webkit-text-fill-color: #87ceeb;
}

.section-title {
    font-family: var(--heading-font);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.schedule-header .section-title {
    color: var(--primary-deep);
}

.schedule-header p {
    color: var(--primary-deep);
}

.section-title::after {
    background: var(--primary);
    height: 2px;
}

/* ===== Cards ===== */
.card {
    background: rgba(var(--card-rgb, 255, 255, 255), var(--card-opacity, 1)) !important;
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 8px !important;
    box-shadow: 0 1px 4px rgba(15, 76, 129, 0.08) !important;
    margin-bottom: 22px !important;
}

.card:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(15, 76, 129, 0.12) !important;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 76, 129, 0.10);
    padding: 14px 16px;
}

.card-header h2,
.card-header h3 {
    font-family: var(--heading-font);
    color: #16263d;
    font-weight: 600;
    text-transform: uppercase;
}

.card-body {
    padding: 16px !important;
}

/* ===== Banner slider ===== */
.banner-slider {
    margin: 22px 0;
}

.banner-slider .banner-slide img {
    object-fit: fill;
}

.banner-slider-dots {
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.banner-slider-dots .dot {
    width: 9px;
    height: 9px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease, transform 0.3s ease;
}

.banner-slider-dots .dot.active {
    background: var(--primary);
    border-color: #ffffff;
    transform: scale(1.3);
}

/* ===== Banner slider: mobile =====
   On phones the fixed 350px height turns the banner into a near-square
   slab. Make it a wide rectangle that matches the banner image ratio. */
@media (max-width: 575.98px) {
    .banner-slider {
        height: auto;
        aspect-ratio: 12 / 5;
    }
    .banner-slider .banner-slide,
    .banner-slider .banner-slide a {
        height: 100%;
    }
    .banner-slider .banner-slide img {
        width: 100%;
        height: 100%;
    }
    .banner-style-minimal {
        aspect-ratio: auto;
        height: auto;
    }
}

/* ===== Now Playing banner ===== */
.np-badge {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.35);
    border-radius: 4px;
}

.np-song {
    font-family: var(--heading-font);
    font-weight: 600;
}

.np-artist {
    color: var(--primary);
}

/* ===== Audio player ===== */
.player-cover {
    border-color: rgba(var(--primary-rgb), 0.7);
    box-shadow: 0 0 26px rgba(var(--primary-rgb), 0.28);
}

.player-artist {
    color: yellow;
    font-weight: 600;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.player-title,
.player-title-scroll {
    color: #ffffff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    filter: none;
}

.btn-play {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
}

.btn-play:hover {
    box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.5);
}

.btn-stop {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    box-shadow: 0 4px 14px rgba(255, 82, 82, 0.35);
}

.volume-control .slider {
    accent-color: var(--primary);
}

.listeners-badge i {
    color: var(--primary);
}

/* ===== Clock ===== */
#date-part {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: var(--primary);
    color: var(--primary);
    text-shadow: none;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1.5px;
}

#time-part {
    color: #16263d;
    text-shadow: none;
    font-size: 2.6rem;
    font-weight: 600;
}

/* ===== Request a Song button ===== */
.req-btn-classic {
    background: linear-gradient(180deg, var(--primary-2) 0%, var(--primary) 100%);
    border: none;
    color: #fff;
    border-radius: 6px;
    font-family: var(--heading-font);
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
    padding: 0.9em 0.75em;
}

.req-btn-classic:hover {
    background: var(--primary-deep);
    color: #fff;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5);
}

/* ===== Recent tracks ===== */
.track-item {
    background: var(--surface-3);
    border-radius: 6px;
    border-left: 3px solid rgba(15, 76, 129, 0.12);
}

.track-item:hover {
    background: #e8f2fc;
    transform: translateX(4px);
}

.track-item.now {
    background: rgba(var(--primary-rgb), 0.10);
    border-left: 3px solid var(--primary);
}

.track-icon {
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary);
}

.track-item.now .track-icon {
    background: var(--primary);
    color: #fff;
}

.track-icon.has-art {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
}

.track-artist {
    color: var(--primary);
}

.track-title {
    color: #000000;
    font-weight: 700;
}

#recent-tracks::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.35);
}

.chatters-site-label {
    color: #000000;
}

/* ===== Staff slider ===== */
.staff-slider-title {
    color: var(--primary-deep);
}

.staff-slider-title i {
    color: var(--primary);
}

.staff-slider-btn {
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.18);
    color: #5a6b85;
}

.staff-slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.staff-slider-dots .dot.active {
    background: var(--primary);
}

.staff-name {
    color: #87ceeb;
    font-family: var(--heading-font);
    font-weight: 600;
}

.top-chatter-name {
    color: #000000;
}

.feed-content {
    color: #000000;
}

.feed-text {
    color: #000000;
}

.feed-time {
    color: #87ceeb;
}

.song-request-title {
    color: #000000;
    font-weight: 700;
}

.song-request-by {
    color: #888888;
}

.staff-bio {
    color: #5a6b85;
}

/* ===== Chat ===== */
.chat-fullscreen-card {
    display: flex;
    flex-direction: column;
    height: 800px;
}

.chat-fullscreen-card .card-body.chat-card {
    flex: 1;
    min-height: 0;
}

.chat-container {
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    background-color: #ffffff;
}

html:has(body.chat-fullscreen-open),
body.chat-fullscreen-open {
    overflow: hidden;
    height: 100%;
}

body.chat-fullscreen-open .chat-fullscreen-card .card-body {
    padding: 0px !important;
}

@media (max-width: 768px) {
    .chat-fullscreen-card .card-body {
        padding: 0px !important;
    }
}

body.chat-fullscreen-open .chat-fullscreen-card {
    height: 100%;
    max-height: var(--kb-h, 100dvh);
}

.btn-chat-fullscreen {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #ffffff;
}

.btn-chat-fullscreen:hover {
    background: var(--primary-deep);
    border-color: var(--primary-deep);
    color: #ffffff;
}

.chat-container .chat-message {
    background: transparent;
}

.chat-container .chat-msg-body {
    background: #012b5b;
    color: #ffffff;
    animation: chatMsgIn 0.45s ease both;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

@keyframes chatMsgIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-container .chat-msg-body::after {
    background: #012b5b;
}

.chat-container .chat-system-text {
    color: #ffffff;
    display: inline-block;
    animation: chatSystemWelcome 1.6s ease both;
}

.chat-container .chat-message.system {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary2-rgb), 0.20), rgba(var(--primary-rgb), 0.12));
    border: 1px solid rgba(var(--primary-rgb), 0.35);
    border-radius: 12px;
    padding: 10px 16px;
    font-style: italic;
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.12);
    justify-content: center;
    text-align: center;
}

@keyframes chatSystemWelcome {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.9);
    }
    30% {
        opacity: 1;
        transform: translateY(0) scale(1.05);
    }
    45% {
        transform: scale(1);
    }
    75% {
        opacity: 1;
    }
    100% {
        opacity: 0.9;
    }
}

/* ===== Animated radio-station welcome bubble (login/register system post) ===== */
.chat-container .chat-message.system.welcome {
    animation: chatWelcomeIn 0.7s cubic-bezier(.2, .9, .3, 1.2) both;
}
.chat-container .chat-welcome-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbe51e;
    background: rgba(187, 229, 30, 0.12);
    border: 1px solid rgba(187, 229, 30, 0.4);
    box-shadow: 0 0 10px rgba(187, 229, 30, 0.18);
    animation: chatWelcomeIn 0.7s cubic-bezier(.2, .9, .3, 1.2) both;
}
.chat-container .chat-welcome-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #bbe51e;
    box-shadow: 0 0 0 0 rgba(187, 229, 30, 0.5);
    animation: chatWelcomeLivePulse 1.4s ease-in-out infinite;
}
.chat-container .chat-welcome-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
}
.chat-container .chat-welcome-eq i {
    display: block;
    width: 3px;
    margin: 0;
    background: #bbe51e;
    border-radius: 2px;
    animation: chatWelcomeEq 1s ease-in-out infinite;
}
.chat-container .chat-welcome-eq i:nth-child(1) { animation-delay: -0.9s; }
.chat-container .chat-welcome-eq i:nth-child(2) { animation-delay: -0.6s; }
.chat-container .chat-welcome-eq i:nth-child(3) { animation-delay: -0.3s; }
.chat-container .chat-welcome-eq i:nth-child(4) { animation-delay: -0.7s; }
.chat-container .chat-message.system.welcome .chat-system-text {
    font-style: normal;
    font-weight: 700;
    color: #ffffff;
    border-color: rgba(var(--primary-rgb), 0.55);
    background: linear-gradient(120deg, rgba(var(--primary-rgb), 0.18), rgba(var(--primary-rgb), 0.42), rgba(var(--primary-rgb), 0.18));
    background-size: 200% 100%;
    box-shadow: 0 0 14px rgba(var(--primary-rgb), 0.28);
    animation: chatWelcomeSweep 2.2s ease-out both;
}
@keyframes chatWelcomeIn {
    0% { opacity: 0; transform: translateY(10px) scale(0.85); }
    60% { opacity: 1; transform: translateY(-2px) scale(1.03); }
    100% { opacity: 1; transform: none; }
}
@keyframes chatWelcomeSweep {
    0% { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}
@keyframes chatWelcomeLivePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(187, 229, 30, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(187, 229, 30, 0); }
}
@keyframes chatWelcomeEq {
    0%, 100% { height: 3px; }
    50% { height: 11px; }
}
.chat-container .chat-welcome-fm-letter {
    display: inline-block;
    animation: chatWelcomeFmRainbow 3s linear infinite;
}
@keyframes chatWelcomeFmRainbow {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.chat-container .chat-input-area {
    background: #ffffff;
    border-top: 1px solid rgba(15, 76, 129, 0.10);
}

.chat-container .chat-input {
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.15);
    color: #24344d;
}

.chat-container .chat-input::placeholder {
    color: rgba(36, 52, 77, 0.45);
}

.btn-chat-send {
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
}

.btn-chat-send:hover {
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.45);
}

.btn-chat-attach,
.btn-chat-smiley {
    color: #5a6b85;
}

.btn-chat-attach:hover,
.btn-chat-smiley:hover,
.btn-chat-attach.has-image {
    color: var(--primary);
}

.chat-auth-tab {
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.18);
    color: #5a6b85;
}

.chat-auth-input {
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.18);
    color: #16263d;
}

.chat-auth-input::placeholder {
    color: rgba(36, 52, 77, 0.45);
}

.chat-auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.15);
}

.chat-auth-btn {
    background: linear-gradient(180deg, var(--primary-2) 0%, var(--primary) 100%);
    border: none;
}

.chat-auth-btn:hover {
    background: var(--primary-deep);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.4);
}

.chat-auth-tab.active {
    background: var(--primary);
    border-color: var(--primary);
}

.chat-auth-friendstag {
    color: var(--primary-2);
}

.chat-auth-divider {
    color: rgba(36, 52, 77, 0.5);
}

/* ===== Schedule ===== */
.schedule-tab {
    border: 1px solid rgba(15, 76, 129, 0.18);
    background: var(--surface-3);
    color: #5a6b85;
    border-radius: 4px;
    box-shadow: none;
}

.schedule-tab:hover {
    border-color: var(--primary);
    color: #16263d;
    transform: none;
    box-shadow: none;
}

.schedule-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: none;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
}

.schedule-item {
    background: var(--surface-3);
    border-radius: 6px;
    border-left: 3px solid rgba(15, 76, 129, 0.12);
    box-shadow: none;
}

.schedule-item:hover {
    transform: none;
    box-shadow: none;
    border-left-color: rgba(var(--primary-rgb), 0.6);
}

.schedule-item.active {
    background: rgba(var(--primary-rgb), 0.10);
    border-left: 3px solid var(--primary);
    box-shadow: none;
    animation: scheduleLiveGlowLight 2s ease-in-out infinite;
}

@keyframes scheduleLiveGlowLight {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.45);
    }
    50% {
        box-shadow: 0 0 16px 3px rgba(255, 215, 0, 0.40);
    }
}

.schedule-time {
    color: #0d3a8b;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.9), 0 0 12px rgba(255, 215, 0, 0.6);
}

.schedule-details h4 {
    font-family: var(--heading-font);
    color: #16263d;
}

.schedule-details p {
    color: #5a6b85;
}

.schedule-status.live,
.schedule-status.upcoming {
    background: #ffd700;
    color: #e63946;
    border-radius: 4px;
}

.schedule-list::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.35);
}

/* ===== DJ card ===== */
.dj-profile {
    background: var(--surface-3);
}

.dj-profile-img {
    border-color: rgba(var(--primary-rgb), 0.6);
    box-shadow: 0 0 22px rgba(var(--primary-rgb), 0.2);
}

.flash-dot {
    color: var(--primary);
}

.ob-djname {
    color: #fff !important;
    font-family: var(--heading-font);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65), 0 0 16px rgba(0, 0, 0, 0.4);
}

.ob-djprog {
    color: var(--primary);
}

/* ===== Posts ===== */
.post-item {
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 8px;
}

.post-item:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 6px 18px rgba(15, 76, 129, 0.12);
}

.post-avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    border: none;
}

.post-like-btn.liked {
    color: var(--primary);
}

.post-like-btn:hover,
.post-comment-toggle:hover {
    color: var(--primary);
}

.post-load-more,
.event-gallery-loadmore {
    background: transparent;
    border: 1px solid rgba(15, 76, 129, 0.25);
    color: #5a6b85;
    border-radius: 4px;
    font-family: var(--heading-font);
    font-weight: 500;
    letter-spacing: 1px;
}

.post-load-more:hover,
.event-gallery-loadmore:hover {
    background: rgba(var(--primary-rgb), 0.10);
    border-color: var(--primary);
    color: #16263d;
}

/* ===== Event / Fansign galleries ===== */
.event-gallery-item {
    border-radius: 6px;
}

.event-gallery-item .event-gallery-caption strong {
    font-family: var(--heading-font);
    color: #ffffff;
}

.event-gallery-count i {
    color: var(--primary);
}

/* ===== Advertisement slider ===== */
.ad-slider-btn {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 76, 129, 0.2);
    color: #16263d;
}

.ad-slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.ad-slider-dots .dot.active {
    background: var(--primary);
}

.ad-cell-caption {
    color: #ffffff;
}

.ad-cell-caption i {
    color: var(--primary);
}

/* ===== About ===== */
.about-card {
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 8px;
}

.about-card:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
    transform: none;
}

.about-card-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
}

.about-card h4 {
    color: var(--primary);
}

/* ===== Sponsors / DJ Gallery (Bootstrap carousel) ===== */
.dj-carousel-img {
    background: linear-gradient(180deg, #ffffff 0%, #f2f7fc 100%);
}

.partner-card {
    border: 1px solid rgba(15, 76, 129, 0.12);
    background: #ffffff;
    border-radius: 8px;
}

.partner-card:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
}

/* ===== Footer ===== */
.footer {
    background: #ffffff;
    border-top: 1px solid rgba(var(--primary-rgb), 0.25);
    padding: 45px 0 62px;
}

.footer-brand {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: var(--primary);
    color: var(--primary);
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer p {
    color: #5a6b85;
    opacity: 1;
}

.footer p.footer-desc {
    color: #ffffff;
}

.footer p.footer-contact {
    color: #ffffff;
}

.footer p i {
    color: var(--primary);
}

.footer hr {
    border-color: rgba(15, 76, 129, 0.12);
}

.footer-social a {
    background: #eef5fd;
    border: 1px solid rgba(15, 76, 129, 0.15);
    color: var(--primary);
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 5px 16px rgba(var(--primary-rgb), 0.4);
}

.footer-shine {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: var(--primary-deep);
    color: var(--primary-deep);
    font-family: var(--heading-font);
    font-size: 1.6rem;
    font-weight: 700;
}

.footer-shine:after {
    display: none;
}

.footer-legends {
    font-family: var(--heading-font);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 3px;
}

.footer a {
    color: var(--primary);
}

.footer a:hover {
    color: var(--primary-deep);
}

.footer-copy {
    color: #ffffff;
}

/* ===== Modals ===== */
.modal-content {
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.15);
    border-radius: 10px;
}

/* Same faint DJ-photo background for the song request modal in the light theme */
#songRequestModal .modal-content {
    position: relative;
    overflow: hidden;
}
#songRequestModal .modal-content.dj-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--dj-bg, none);
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    pointer-events: none;
    border-radius: inherit;
}
#songRequestModal .modal-content.dj-bg > * {
    position: relative;
    z-index: 1;
}

/* Friendstag connect modal */
.friendstag-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px auto 14px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.10), rgba(255, 180, 0, 0.12));
    border: 1px solid rgba(15, 76, 129, 0.18);
}
.friendstag-modal-icon img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}
.friendstag-modal-icon i {
    font-size: 1.9rem;
    color: var(--primary);
}
.friendstag-modal-icon i.icon-off {
    color: rgba(51, 65, 94, 0.35);
}
.friendstag-modal-desc {
    color: #33415e;
    line-height: 1.6;
    margin: 0 auto 14px;
    max-width: 380px;
}
.friendstag-modal-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    background: rgba(15, 76, 129, 0.06);
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #52637f;
    margin: 0 auto;
    max-width: 380px;
    line-height: 1.5;
}
.friendstag-modal-note i {
    color: var(--primary);
    margin-top: 2px;
}

.modal-header,
.modal-footer {
    border-color: rgba(15, 76, 129, 0.10);
}

.modal-title {
    color: #16263d;
    font-family: var(--heading-font);
    font-weight: 600;
}

.modal-body {
    color: #33415e;
}

.modal-header .close {
    color: #16263d;
    opacity: 0.55;
    text-shadow: none;
}

.modal-header .close:hover {
    color: #16263d;
    opacity: 1;
}

.modal .form-control {
    background: var(--surface-3);
    border-color: rgba(15, 76, 129, 0.15);
    color: #16263d;
}

.modal .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.15);
    background: #ffffff;
    color: #16263d;
}

.modal .form-control::placeholder {
    color: rgba(36, 52, 77, 0.45);
}

.modal .btn-primary {
    background: linear-gradient(180deg, var(--primary-2) 0%, var(--primary) 100%);
    border-color: var(--primary);
    font-family: var(--heading-font);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.modal .btn-primary:hover {
    background: var(--primary-deep);
    border-color: var(--primary-deep);
}

.modal .btn-secondary {
    background: #e8f1fb;
    border-color: #e8f1fb;
    color: #33415e;
}

.modal .btn-secondary:hover {
    background: var(--bg-deep);
    border-color: var(--bg-deep);
    color: #16263d;
}

.modal .btn-danger {
    background: #ff5252;
    border-color: #ff5252;
}

.song-request-list-head {
    color: #16263d;
}

.song-request-status {
    border-radius: 4px;
}

.song-request-status.req-pending {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .navbar-nav .nav-item a {
        padding: 10px 14px !important;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .hero-heading-row .shine-text {
        font-size: 2.2rem;
    }
    .hero-heading-row h2 {
        font-size: 0.8rem;
        letter-spacing: 3px;
    }
    .hero-heading-row .legends-text {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }
}

/* ============================================
   OnAir2 clone: hero widget, news grid,
   chart, and fixed bottom ON AIR player bar
   ============================================ */

/* Reserve space for the fixed bottom bar inside the footer so its
   background runs all the way to the bottom (no gap above the bar) */
body {
    padding-bottom: 0;
}

/* ===== Hero widget row ===== */
#hero-widget-row {
    margin-top: 0;
    position: relative;
    z-index: 5;
}

#hero-widget-row .card {
    margin-bottom: 22px;
}

/* ===== Now On Air widget ===== */
.now-on-air-card .card-body {
    padding: 16px;
}

.now-on-air-show {
    margin-top: 14px;
    border-top: 1px solid rgba(15, 76, 129, 0.10);
    padding-top: 14px;
}

.now-on-air-dj {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.now-on-air-avatar {
    flex-shrink: 0;
    display: block;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--primary2-rgb), 0.55));
    box-shadow: 0 8px 28px rgba(var(--primary-rgb), 0.35);
}

.now-on-air-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    display: block;
}

.now-on-air-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    align-items: center;
}

.now-on-air-meta .live-badge {
    position: static;
    transform: none;
    align-self: center;
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 3px;
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.5);
    color: #ff6b6b;
}

.now-on-air-meta .ob-djname {
    font-size: 1.15rem;
    margin: 6px 0 0;
    text-align: center;
    letter-spacing: 1px;
}

.now-on-air-meta .ob-djprog {
    font-size: 0.85rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.now-on-air-time {
    color: #5a6b85;
    font-size: 0.78rem;
    margin-top: 4px;
}

.now-on-air-time i {
    color: var(--primary);
}

.coming-next {
    margin-top: 14px;
}

.coming-next-title {
    display: block;
    font-family: var(--heading-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.coming-next-title i {
    color: var(--primary);
}

.coming-next-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 5px;
    background: var(--surface-3);
    border-left: 2px solid rgba(var(--primary-rgb), 0.35);
    margin-bottom: 6px;
}

.coming-next-time {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 58px;
}

.coming-next-name {
    color: #33415e;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Latest News grid (OnAir2 news cards) ===== */
#posts-section .post-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

#posts-section .post-feed-empty {
    grid-column: 1 / -1;
    color: rgba(36, 52, 77, 0.55);
}

.dj-team-empty {
    color: rgba(36, 52, 77, 0.55);
}

.event-gallery-empty {
    color: rgba(36, 52, 77, 0.55);
}

#posts-section .post-item {
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

#posts-section .post-item:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.14);
}

/* Image header */
#posts-section .post-item-header {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    border-bottom: 1px solid rgba(15, 76, 129, 0.12);
}

#posts-section .post-image {
    position: relative;
    margin: 0;
    height: 185px;
    border: none;
    border-radius: 0;
    background: linear-gradient(135deg, var(--primary-deep), var(--primary));
    overflow: hidden;
}

#posts-section .post-image-bg img {
    object-fit: cover;
    opacity: 1;
    transform: scale(1.15);
    filter: blur(6px);
}

#posts-section .post-image-main {
    object-fit: cover;
}

#posts-section .post-image-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.4rem;
}

/* Dark gradient overlay */
#posts-section .post-item-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(13, 71, 161, 0.55) 0%, rgba(13, 71, 161, 0.1) 45%, rgba(13, 30, 60, 0.65) 100%);
    pointer-events: none;
}

/* Top row: tag + feedback counts */
#posts-section .post-header-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
}

#posts-section .post-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(13, 71, 161, 0.85);
    color: #ffffff;
    font-family: var(--heading-font);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

#posts-section .post-feedback {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#posts-section .post-feedback-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-size: 0.72rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#posts-section .post-feedback-item i {
    font-size: 0.78rem;
}

/* Bottom row: read more button */
#posts-section .post-header-bottom {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
}

#posts-section .post-readmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: none;
    border-radius: 3px;
    background: #ffffff;
    color: var(--primary-deep);
    font-family: var(--heading-font);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.2s ease, color 0.2s ease;
}

#posts-section .post-readmore:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Body below image */
#posts-section .post-item-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

#posts-section .post-item-head {
    margin-bottom: 8px;
}

#posts-section .post-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    border: none;
}

#posts-section .post-author {
    font-size: 0.82rem;
    color: #1a2b45;
    font-family: var(--heading-font);
    letter-spacing: 0.5px;
}

#posts-section .post-time {
    font-size: 0.72rem;
    color: #8494ac;
}

#posts-section .post-text {
    margin-top: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #33415e;
}

#posts-section .post-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 76, 129, 0.1);
}

#posts-section .post-comment-toggle,
#posts-section .post-like-btn {
    color: #5a6b85;
    font-size: 0.8rem;
}

#posts-section .post-comment-toggle .post-comment-count,
#posts-section .post-like-btn .post-like-count {
    background: rgba(15, 76, 129, 0.08);
    color: #5a6b85;
}

/* ===== The Chart ===== */
.chart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.10);
    border-radius: 8px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.chart-item:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    transform: translateX(4px);
}

.chart-rank {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.14);
    border: 1px solid rgba(var(--primary-rgb), 0.45);
    color: var(--primary);
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 1.05rem;
}

.chart-art {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(var(--primary-rgb), 0.12);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.chart-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chart-title {
    color: #16263d;
    font-family: var(--heading-font);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-artist {
    color: var(--primary);
    font-size: 0.85rem;
}

.chart-requests {
    flex-shrink: 0;
    color: #5a6b85;
    font-size: 0.85rem;
}

.chart-requests i {
    color: var(--primary);
}

.chart-more-wrap {
    text-align: center;
    padding-top: 14px;
}

.chart-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 8px 22px;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.chart-load-more:hover {
    background: var(--primary-dark, #0b4a80);
}

/* ===== OnAir2 Fixed Bottom Player Bar ===== */
.onair2-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: #ffffff;
    border-top: 2px solid var(--primary);
    box-shadow: 0 -6px 24px rgba(15, 76, 129, 0.12);
}

.onair2-bottom-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.onair2-bottom-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.onair2-onair-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.55);
    color: #ff6b6b;
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 2px;
    border-radius: 4px;
    padding: 5px 12px;
    white-space: nowrap;
}

.onair2-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5252;
    animation: onairPulse 1.2s ease-in-out infinite;
}

@keyframes onairPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(255, 82, 82, 0); }
}

.onair2-bottom-station {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.onair2-bottom-station-name {
    color: #16263d;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.onair2-bottom-track {
    color: var(--primary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

.onair2-bottom-track #np-song,
.onair2-bottom-track #np-artist {
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    text-shadow: none;
    margin: 0;
    color: inherit;
}

.onair2-bottom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.onair2-bottom-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.onair2-bottom-play {
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 3px 12px rgba(var(--primary-rgb), 0.4);
}

.onair2-bottom-play:hover {
    box-shadow: 0 5px 18px rgba(var(--primary-rgb), 0.55);
}

.onair2-bottom-stop {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    box-shadow: 0 3px 12px rgba(255, 82, 82, 0.4);
}

.onair2-bottom-vol {
    display: flex;
    align-items: center;
    gap: 6px;
}

.onair2-bottom-volicon {
    color: #5a6b85;
    font-size: 13px;
}

.onair2-bottom-volume {
    width: 90px;
    accent-color: var(--primary);
    cursor: pointer;
}

.onair2-bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.onair2-bottom-right a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef5fd;
    color: #5a6b85;
    font-size: 12px;
}

.onair2-bottom-right a:hover {
    background: var(--primary);
    color: #ffffff;
}

/* ===== Maintenance mode: keep hero player full width ===== */
body.maintenance-mode .maintenance-only > .col-md-7.maintenance-show {
    flex: 0 0 100%;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 24px;
}

body.maintenance-mode .onair2-bottom-bar {
    display: none !important;
}

/* ===== Responsive (clone additions) ===== */
@media (max-width: 991px) {
    #posts-section .post-feed {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #hero-widget-row {
        margin-top: 0;
    }
    .onair2-bottom-track {
        max-width: 180px;
    }
    .onair2-bottom-right {
        display: none;
    }
    #posts-section .post-feed {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .onair2-bottom-volume {
        width: 60px;
    }
    .onair2-bottom-left {
        flex-wrap: wrap;
    }
}

/* ===== Now Playing bar (AzuraCast album art) ===== */
.onair2-nowplaying {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 76, 129, 0.12);
}

.onair2-nowplaying-bg {
    position: absolute;
    top: -24px;
    left: -24px;
    right: -24px;
    bottom: -24px;
    background-image: url('uploads/album/default-album.png');
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.3) brightness(1.05);
    transform: scale(1.08);
    opacity: 0.8;
    animation: nowplayingBgPulse 12s ease-in-out infinite;
}

@keyframes nowplayingBgPulse {
    0%, 100% { transform: scale(1.06); filter: blur(18px) saturate(1.3) brightness(1.05); }
    50% { transform: scale(1.12); filter: blur(22px) saturate(1.5) brightness(1.1); }
}

.onair2-nowplaying-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.35) 55%, rgba(255, 255, 255, 0.15) 100%);
}

.onair2-nowplaying-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
}

.onair2-nowplaying-cover {
    position: relative;
    flex-shrink: 0;
}

.onair2-nowplaying-cover img {
    display: block;
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 6px 18px rgba(15, 76, 129, 0.28);
}

.onair2-nowplaying-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.onair2-nowplaying-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--heading-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 3px;
}

.onair2-nowplaying-label .onair2-pulse {
    width: 7px;
    height: 7px;
    background: #ff5252;
}

.onair2-nowplaying-song {
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.25;
    color: #16263d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onair2-nowplaying-artist {
    color: #5a6b85;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 2px;
}

@media (max-width: 576px) {
    .onair2-nowplaying-inner {
        gap: 12px;
        padding: 14px 16px;
    }
    .onair2-nowplaying-cover img {
        width: 62px;
        height: 62px;
    }
    .onair2-nowplaying-song {
        font-size: 1.05rem;
    }
    .onair2-nowplaying-artist {
        font-size: 0.85rem;
    }
}

/* ===== Video gallery: OnAir2 CURRENT RADIO SHOW style ===== */
#video-gallery-section .video-gallery-body {
    --vs-accent: var(--primary-2);
    --vs-frame-bg: #0a1f3c;
    --vs-frame-border: rgba(255, 255, 255, 0.18);
    --vs-ph-grad: linear-gradient(135deg, rgba(10, 31, 60, 0.95), rgba(16, 41, 78, 0.92));
    --vs-ph-text: rgba(255, 255, 255, 0.65);
    --vs-title: #ffffff;
    --vs-desc: rgba(255, 255, 255, 0.6);
    --vs-head: var(--primary-2);
    --vs-item-bg: rgba(255, 255, 255, 0.06);
    --vs-item-border: rgba(255, 255, 255, 0.14);
    --vs-item-hover-bg: rgba(255, 255, 255, 0.1);
    --vs-item-active-bg: rgba(var(--primary-rgb), 0.2);
    --vs-item-active-shadow: rgba(var(--primary2-rgb), 0.12);
    --vs-item-text: rgba(255, 255, 255, 0.85);
    --vs-item-title: #ffffff;
    --vs-item-meta: rgba(255, 255, 255, 0.5);
    --vs-comments-border: rgba(255, 255, 255, 0.12);
    --vs-comments-head: rgba(255, 255, 255, 0.8);
    --vs-count-bg: rgba(255, 255, 255, 0.12);
    --vs-count-text: rgba(255, 255, 255, 0.75);
    --vs-user-text: rgba(255, 255, 255, 0.9);
    --vs-avatar-border: rgba(255, 255, 255, 0.22);
    --vs-input-bg: rgba(255, 255, 255, 0.08);
    --vs-input-border: rgba(255, 255, 255, 0.18);
    --vs-input-text: #ffffff;
    --vs-input-ph: rgba(255, 255, 255, 0.45);
    --vs-send-bg: rgba(255, 255, 255, 0.1);
    --vs-send-border: rgba(255, 255, 255, 0.18);
    --vs-send-text: rgba(255, 255, 255, 0.75);
    --vs-login-bg: rgba(255, 255, 255, 0.05);
    --vs-login-border: rgba(255, 255, 255, 0.18);
    --vs-login-text: rgba(255, 255, 255, 0.6);
    --vs-comment-bg: rgba(255, 255, 255, 0.05);
    --vs-comment-border: rgba(255, 255, 255, 0.1);
    --vs-author: #ffffff;
    --vs-comment-time: rgba(255, 255, 255, 0.45);
    --vs-comment-text: rgba(255, 255, 255, 0.85);
    --vs-empty: rgba(255, 255, 255, 0.45);
    background: linear-gradient(160deg, #0a1f3c 0%, #123459 100%);
    border-radius: 0 0 8px 8px;
    padding: 20px;
}

#video-gallery-section .video-caption-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-family: var(--heading-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-2);
}

#video-gallery-section .video-caption-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--primary2-rgb), 0.55), rgba(var(--primary2-rgb), 0));
}

#video-gallery-section .video-frame {
    border-radius: 12px;
    border-color: var(--vs-frame-border);
}

#video-gallery-section .video-now {
    margin-top: 14px;
    font-family: var(--brand-font);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

#video-gallery-section .video-desc {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.55;
}

#video-gallery-section .video-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#video-gallery-section .video-meta-plays {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

#video-gallery-section .video-meta-plays i {
    color: var(--primary-2);
    margin-right: 5px;
}

#video-gallery-section .video-meta-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    color: #ffffff;
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.35);
}

#video-gallery-section .video-meta-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.45);
}

#video-gallery-section .video-playlist-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-2);
    padding: 2px 2px 12px;
    border-bottom: 1px solid rgba(var(--primary2-rgb), 0.25);
    margin-bottom: 12px;
}

#video-gallery-section .video-playlist {
    max-height: 300px;
}

#video-gallery-section .video-playlist-item {
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

#video-gallery-section .video-playlist-item:hover {
    transform: translateX(4px);
}

#video-gallery-section .video-playlist-item.active {
    border-left: 3px solid var(--primary-2);
    background: rgba(var(--primary-rgb), 0.2);
    box-shadow: none;
}

/* ===== Post modal (Latest News) light theme ===== */
#postModal .post-modal-panel {
    background: #ffffff;
}

#postModal .post-modal-head {
    border-bottom: 1px solid rgba(15, 76, 129, 0.1);
}

#postModal .post-author {
    color: #16263d;
}

#postModal .post-time {
    color: #8494ac;
}

#postModal .post-text {
    color: #33415e;
}

#postModal .post-modal-actions {
    border-top: 1px solid rgba(15, 76, 129, 0.1);
}

#postModal .post-like-btn {
    color: #5a6b85;
}

#postModal .post-like-btn .post-like-count {
    background: rgba(15, 76, 129, 0.08);
    color: #5a6b85;
}

#postModal .post-modal-comment-count {
    color: #5a6b85;
}

#postModal .post-modal-comment-count .post-comment-count {
    background: rgba(15, 76, 129, 0.08);
    color: #5a6b85;
}

#postModal .post-modal-comments {
    border-top: 1px solid rgba(15, 76, 129, 0.1);
}

#postModal .post-comment-input-row {
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.14);
}

#postModal .post-comment-input-row:focus-within {
    border-color: var(--primary);
}

#postModal .post-comment-input {
    color: #16263d;
}

#postModal .post-comment-input::placeholder {
    color: #8494ac;
}

#postModal .post-comment-login {
    background: var(--surface-3);
    border: 1px dashed rgba(15, 76, 129, 0.35);
    color: #5a6b85;
}

#postModal .post-comments-empty {
    color: #8494ac;
}

#postModal .post-comment-item {
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.10);
}

#postModal .post-comment-author {
    color: #16263d;
}

#postModal .post-comment-time {
    color: #8494ac;
}

#postModal .post-comment-text {
    color: #33415e;
}

#postModal .post-comment-like-btn {
    color: #5a6b85;
}

#postModal .post-comment-like-btn.liked {
    color: var(--primary);
}

#postModal .post-comment-btn {
    color: #8494ac;
}

#postModal .post-comment-loadmore {
    background: transparent;
    border: 1px solid rgba(15, 76, 129, 0.25);
    color: #5a6b85;
    border-radius: 4px;
}

#postModal .post-comment-loadmore:hover {
    background: rgba(var(--primary-rgb), 0.10);
    border-color: var(--primary);
    color: #16263d;
}

/* ===== Event / Fansign gallery lightbox (light theme) ===== */
.lightbox-overlay .lightbox-modal {
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.12);
}

.lightbox-overlay .lightbox-panel {
    border-left: 1px solid rgba(15, 76, 129, 0.12);
}

.lightbox-overlay .lightbox-caption {
    color: #16263d;
    border-bottom: 1px solid rgba(15, 76, 129, 0.1);
}

.lightbox-overlay .lightbox-caption small {
    color: #5a6b85;
}

.lightbox-overlay .lightbox-caption em {
    color: #8494ac;
}

.lightbox-overlay .lightbox-comments .video-comments-head {
    color: #16263d;
}

.lightbox-overlay .lightbox-comments .video-comments-count {
    background: rgba(15, 76, 129, 0.08);
    color: #5a6b85;
}

.lightbox-overlay .lightbox-comments .video-comment-user {
    color: #16263d;
}

.lightbox-overlay .lightbox-comments .video-comment-input {
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.14);
    color: #16263d;
}

.lightbox-overlay .lightbox-comments .video-comment-input:focus {
    border-color: var(--primary);
}

.lightbox-overlay .lightbox-comments .video-comment-input::placeholder {
    color: #8494ac;
}

.lightbox-overlay .lightbox-comments .video-comment-send {
    border: 1px solid rgba(15, 76, 129, 0.2);
    background: rgba(var(--primary-rgb), 0.10);
    color: var(--primary);
}

.lightbox-overlay .lightbox-comments .video-comment-login {
    background: var(--surface-3);
    border: 1px dashed rgba(15, 76, 129, 0.35);
    color: #5a6b85;
}

.lightbox-overlay .lightbox-comments .video-comments-empty {
    color: #8494ac;
}

.lightbox-overlay .lightbox-comments .video-comment-item {
    background: var(--surface-3);
    border: 1px solid rgba(15, 76, 129, 0.10);
}

.lightbox-overlay .lightbox-comments .video-comment-author {
    color: #16263d;
}

.lightbox-overlay .lightbox-comments .video-comment-time {
    color: #8494ac;
}

.lightbox-overlay .lightbox-comments .video-comment-text {
    color: #33415e;
}

.lightbox-overlay .lightbox-comments .video-comment-btn {
    border-color: rgba(15, 76, 129, 0.15);
    color: #8494ac;
}

.lightbox-overlay .lightbox-comments .video-comment-like-btn {
    color: #5a6b85;
}

.lightbox-overlay .lightbox-comments .video-comment-like-btn.liked {
    color: var(--primary);
}

.lightbox-overlay .lightbox-comments .event-comment-loadmore {
    border: 1px solid rgba(15, 76, 129, 0.25);
    background: transparent;
    color: #5a6b85;
    border-radius: 4px;
}

.lightbox-overlay .lightbox-comments .event-comment-loadmore:hover {
    background: rgba(var(--primary-rgb), 0.10);
    border-color: var(--primary);
    color: #16263d;
}

@media (max-width: 860px) {
    .lightbox-overlay .lightbox-panel {
        border-left: none;
        border-top: 1px solid rgba(15, 76, 129, 0.12);
    }
}

/* =========================================================
   MOBILE LAYOUT OPTIMIZATION
   ========================================================= */

/* Prevent iOS Safari from auto-inflating layout text */
html {
    -webkit-text-size-adjust: 100%;
}

/* Header: do not let the fixed 640px min-height push the hero off small screens */
@media (max-width: 767.98px) {
    .main_header.has-header-video,
    .main_header.has-header-photo {
        min-height: 72vh;
    }
}

@media (max-width: 768px) {
    /* Embedded chat: fill the whole card body so the messages box matches the
       card; --kb-h is the stable (clamped) keyboard height */
    .chat-container {
        height: 100%;
    }
}

@media (max-width: 575.98px) {
    .main_header.has-header-video,
    .main_header.has-header-photo {
        min-height: 60vh;
    }

    /* Embedded chat: fill the whole card body so the messages box matches the
       card; --kb-h is the stable (clamped) keyboard height */
    .chat-container {
        height: 100%;
    }

    /* Schedule: comfortable tap targets */
    .schedule-tab {
        padding: 9px 13px;
        font-size: 12px;
    }

    .schedule-status {
        font-size: 10px;
        padding: 5px 11px;
    }

    /* Bottom fixed player bar: safe-area padding for notched phones */
    .onair2-bottom-inner {
        gap: 10px;
        padding: 8px 12px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .onair2-bottom-track {
        max-width: 165px;
        font-size: 11px;
    }

    .onair2-bottom-station-name {
        font-size: 12px;
    }

    .onair2-onair-badge {
        padding: 4px 9px;
        font-size: 10px;
    }

    .onair2-bottom-btn {
        width: 38px;
        height: 38px;
    }

    /* Now Playing (album art) bar safe-area padding */
    .onair2-nowplaying-inner {
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }

    /* The wrapped bottom player bar is taller on phones; keep the footer clear */
    .footer {
        padding-bottom: 120px;
    }
}

/* Very small phones (<=400px) */
@media (max-width: 400px) {
    .main_header.has-header-video,
    .main_header.has-header-photo {
        min-height: 56vh;
    }

    .hero-logo {
        max-width: 150px;
        max-height: 150px;
    }

    .logo {
        width: 120px;
        height: 120px;
    }

    .logo-fm {
        font-size: 2.4rem;
    }

    .logo-station {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .hero-heading-row h2 {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .hero-heading-row .shine-text,
    .hero-heading-row .legends-text {
        font-size: 1.7rem;
        overflow-wrap: break-word;
    }

    .hero-marquee h4 {
        font-size: 0.8rem;
        overflow-wrap: break-word;
    }

    #time-part {
        font-size: 1.7em;
    }

    /* Event / Fansign gallery: one big column instead of two cramped ones */
    .event-gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .event-gallery-date,
    .event-gallery-count {
        font-size: 0.66rem;
        padding: 6px 11px;
        top: 8px;
    }

    .event-gallery-date {
        left: 8px;
    }

    .event-gallery-count {
        right: 8px;
    }

    /* Now Playing bar: tighter on tiny screens */
    .onair2-nowplaying-inner {
        gap: 10px;
        padding: 12px;
    }

    .onair2-nowplaying-cover img {
        width: 54px;
        height: 54px;
    }

    .onair2-nowplaying-label {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .onair2-nowplaying-song {
        font-size: 0.92rem;
    }

    .onair2-nowplaying-artist {
        font-size: 0.78rem;
    }
}

/* Top chatters avatar count is too tiny to read on phones */
@media (max-width: 767.98px) {
    .top-chatter-count {
        font-size: 0.7rem;
    }
}

/* Section headings: never let long words blow out the layout */
@media (max-width: 767.98px) {
    .title-divider,
    .section-title,
    .card-title,
    .schedule-details h4 {
        overflow-wrap: break-word;
    }
}

/* Advertisement slider arrows: always visible + large enough to tap on touch */
@media (pointer: coarse), (max-width: 768px) {
    .ad-slider-btn {
        opacity: 0.9;
        width: 44px;
        height: 44px;
    }
}

/* Embedded chat message controls need real tap targets on touch devices */
@media (pointer: coarse) {
    .btn-msg-delete,
    .btn-msg-pm,
    .btn-msg-reply {
        min-width: 34px;
        min-height: 34px;
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .btn-msg-react {
        min-width: 30px;
        min-height: 30px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .chat-preview-remove {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    #feedPhotoModal .chat-feed-comment-actions .chat-feed-edit,
    #feedPhotoModal .chat-feed-comment-actions .chat-feed-del,
    #feedCommentsModal .chat-feed-comment-actions .chat-feed-edit,
    #feedCommentsModal .chat-feed-comment-actions .chat-feed-del {
        margin: 0;
        padding: 0;
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* ===== Profile modal: user search ===== */
.chat-profile-search-wrap {
    position: relative;
    margin-bottom: 14px;
}
.chat-profile-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8494ac;
    font-size: 13px;
    pointer-events: none;
}
.chat-profile-search-input {
    width: 100%;
    display: block;
    resize: none;
    overflow: hidden;
    padding: 9px 14px 9px 36px;
    border: 1px solid rgba(15, 76, 129, 0.18);
    border-radius: 8px;
    background: var(--surface-3);
    color: #16263d;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    outline: none;
}
.chat-profile-search-input:focus {
    border-color: var(--primary);
}
.chat-profile-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 76, 129, 0.18);
}
.chat-profile-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.chat-profile-search-result:hover {
    background: rgba(var(--primary-rgb), 0.08);
}
.chat-profile-search-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.chat-profile-search-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.chat-profile-search-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #16263d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-profile-search-uname {
    font-size: 12px;
    color: var(--primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-profile-search-arrow {
    color: #b7c4d6;
    font-size: 12px;
    flex-shrink: 0;
}
.chat-profile-search-empty {
    padding: 12px 14px;
    color: #8494ac;
    font-size: 13px;
}

/* ===== Lock page scroll while a modal is open (mobile): only the modal box scrolls ===== */
html.modal-open,
body.modal-open,
html:has(#chatProfileModal.show) {
    overflow: hidden !important;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html.modal-open::-webkit-scrollbar,
body.modal-open::-webkit-scrollbar,
html.modal-open + body::-webkit-scrollbar,
html:has(#chatProfileModal.show)::-webkit-scrollbar,
html:has(#chatProfileModal.show) body::-webkit-scrollbar {
    display: none;
}
#chatProfileModal.show,
#chatProfileModal .modal-dialog,
#chatProfileModal .modal-content,
#chatProfileModal .modal-body,
#frameStoreModal,
#itemStoreModal {
    overscroll-behavior: contain;
}
#chatProfileModal,
#chatProfileModal .modal-dialog,
#chatProfileModal .modal-content,
#chatProfileModal .modal-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#chatProfileModal::-webkit-scrollbar,
#chatProfileModal .modal-dialog::-webkit-scrollbar,
#chatProfileModal .modal-content::-webkit-scrollbar,
#chatProfileModal .modal-body::-webkit-scrollbar {
    display: none;
}
@media (max-width: 767.98px) {
    #chatProfileModal .modal-dialog {
        height: auto;
        min-height: 100dvh;
        max-height: none;
        width: 100%;
    }
    #chatProfileModal .modal-content {
        height: auto;
        max-height: calc(100dvh - 16px);
        width: 100%;
    }
    #chatNoteModal .modal-dialog,
    #chatNoteViewModal .modal-dialog {
        padding: 0 12px;
    }
}

/* Profile modal: center the content in the middle of the screen */
#chatProfileModal.modal {
    padding: 0 !important;
    margin: 0;
}
#chatProfileModal .modal-dialog {
    margin: 0 auto;
    width: 100%;
    max-width: 900px;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#chatProfileModal .modal-content {
    border-radius: 16px;
    height: auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
}
#chatProfileModal .modal-header {
    padding-top: 10px;
}

/* ===== Wall post comments & photo comments: scroll the whole modal body, like the profile modal ===== */
#feedCommentsModal .modal-dialog,
#feedCommentsModal .modal-content,
#feedPhotoModal .modal-dialog,
#feedPhotoModal .modal-content {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}
#feedCommentsModal .modal-body,
#feedPhotoModal .modal-body {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#feedCommentsModal .chat-feed-cm-list,
#feedPhotoModal .chat-feed-photo-cm-list {
    flex: none;
    max-height: none;
    overflow: visible;
}
#feedPhotoModal .chat-feed-photo-cm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
@media (max-width: 767.98px) {
    #feedCommentsModal .modal-dialog,
    #feedCommentsModal .modal-content,
    #feedPhotoModal .modal-dialog,
    #feedPhotoModal .modal-content {
        height: 100dvh;
        max-height: 100dvh;
    }
}

/* ===== Comments & photo comments: keep the write-comment box pinned at the bottom ===== */
#feedCommentsModal .chat-feed-cm-form,
#feedPhotoModal .chat-feed-photo-cm-form {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #ffffff;
}
#feedPhotoModal .chat-feed-photo-cm-form {
    padding-top: 8px;
    box-shadow: 0 -6px 12px rgba(15, 76, 129, 0.06);
}

#chatPmModal .chat-pm-input {
    resize: none;
    height: 34px;
    min-height: 34px;
    max-height: 80px;
    overflow-y: hidden;
    line-height: 1.4;
    box-sizing: border-box;
}

#chatPmModal .chat-pm-head .chat-pm-partner {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    gap: 8px;
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    background: transparent;
    border-bottom: none;
    order: 2;
}

#chatPmModal .chat-pm-head {
    flex-wrap: nowrap;
    border-bottom: none;
}

#chatPmModal .chat-pm-head .chat-pm-title {
    flex: 1;
    min-width: 0;
    order: 0;
}

#chatPmModal .chat-pm-head .btn-chat-pm-back {
    order: 0;
}

#chatPmModal .chat-pm-head .chat-pm-theme-wrap {
    order: 11;
    margin-left: auto;
}

#chatPmModal .chat-pm-head .btn-chat-pm-close {
    order: 12;
}

#chatPmModal .chat-pm-head .chat-pm-avatar {
    width: 22px;
    height: 22px;
}

#chatPmModal .chat-pm-head .chatter-online-dot {
    width: 8px;
    height: 8px;
    right: -1px;
    bottom: -1px;
    border-width: 1px;
}

#chatPmModal .chat-pm-head .chat-pm-partner-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.2;
    max-width: 100%;
}

/* ===== FB-app style: comment & photo-comment composer (avatar + rounded input + circular send) ===== */
#feedCommentsModal .chat-feed-cm-form,
#feedPhotoModal .chat-feed-photo-cm-form {
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px env(safe-area-inset-bottom);
}
#feedCommentsModal .modal-body,
#feedPhotoModal .modal-body {
    padding-bottom: 0;
}
#feedCommentsModal .chat-feed-cm-form-avatar,
#feedPhotoModal .chat-feed-cm-form-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}
#feedCommentsModal .chat-feed-comment-body,
#feedPhotoModal .chat-feed-comment-body {
    padding: 8px 14px;
}
#feedCommentsModal .modal-dialog {
    max-width: 900px;
}
#feedCommentsModal .chat-feed-cm-form textarea,
#feedPhotoModal .chat-feed-photo-cm-form textarea {
    flex: 1;
    min-width: 0;
    padding: 8px 14px;
    border-radius: 20px;
    min-height: 34px;
    max-height: 80px;
    height: 34px;
    overflow-y: hidden;
    resize: none;
    border: 1px solid transparent;
    background: #f0f2f5;
    outline: none;
    -webkit-appearance: none;
}
#feedCommentsModal .chat-feed-cm-form textarea:focus,
#feedPhotoModal .chat-feed-photo-cm-form textarea:focus {
    border-color: var(--primary, #1e90ff);
    background: #ffffff;
}
#feedCommentsModal .chat-feed-cm-send,
#feedPhotoModal #btnFeedPhotoCmSend {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    flex-shrink: 0;
}
#feedCommentsModal .chat-feed-cm-send i,
#feedPhotoModal #btnFeedPhotoCmSend i {
    font-size: 14px;
    margin: 0;
}

/* ===== FB-app style: bottom-sheet presentation on mobile ===== */
@media (max-width: 767.98px) {
    #feedCommentsModal .modal-content,
    #feedPhotoModal .modal-content {
        border-radius: 18px 18px 0 0;
    }
    #feedCommentsModal.modal .modal-dialog,
    #feedPhotoModal.modal .modal-dialog {
        transform: translateY(40px);
        transition: transform 0.24s ease;
    }
    #feedCommentsModal.modal.show .modal-dialog,
    #feedPhotoModal.modal.show .modal-dialog {
        transform: translateY(0);
    }
}

/* ===== Private Messages modal (index.php) ===== */
#chatPmModal .modal-dialog {
    margin: 0 auto;
    width: 100%;
    max-width: 720px;
    height: 100vh;
    height: var(--kb-h, 100dvh);
    max-height: 100vh;
    max-height: var(--kb-h, 100dvh);
    display: flex;
    flex-direction: column;
}
#chatPmModal .modal-content {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
#chatPmModal .modal-body {
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* Mobile: no rubber-band blank space below the composer while scrolling the
   PM thread; keep the composer pinned as a flex child at the bottom of the
   --kb-h-sized modal (no scrollable gap may appear underneath it). */
@media (max-width: 767.98px) {
    #chatPmModal.show,
    #chatPmModal.show .modal-dialog,
    #chatPmModal.show .modal-content,
    #chatPmModal.show .chat-pm-messages,
    #chatPmModal.show .chat-pm-inbox {
        overscroll-behavior: none;
    }
    #chatPmModal.show .chat-pm-input-row {
        flex-shrink: 0;
        margin: 0;
    }
}
