/* --- Page-level sticky footer layout --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #eeeeee;
}

.page-wrapper {
    max-width: 950px;
    width: 100%;
    margin: 0 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #eeeeee;
    box-sizing: border-box;
}

.site-header {
    background: #0000dd;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 12px 10px;
    flex-shrink: 0;
    position: relative;
}

.site-header-main {
    display: inline-block;
}

.site-header-brand {
    color: #fff;
    text-decoration: none;
}

.site-header a:link,
.site-header a:visited,
.site-header a:active,
.site-header a:hover {
    color: #fff !important;
    text-decoration: none;
}

.site-header-tagline {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: normal;
    margin-left: 4px;
}

.mobile-menu-toggle {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}
.mobile-menu-toggle:active {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile slide-in panel backdrop */
.mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-nav-backdrop.active {
    display: block;
    opacity: 1;
}

.home-wrap {
    flex: 1 0 auto;
    width: 100%;
    text-align: center;
    padding-top: 15px;
}

/* Responsive two-column layout */
.responsive-layout {
    display: flex;
    gap: 0;
    width: 100%;
}
.responsive-layout .home-content {
    flex: 1;
    min-width: 0;
}
.responsive-layout .home-right {
    width: 250px;
    flex-shrink: 0;
}

.footer-wrap {
    flex-shrink: 0;
    width: 100%;
}

.footer-wrap .copyright {
    width: 100%;
    margin: 0;
}

/* --- Homepage intro --- */
.chatselect td.category-intro,
.category-intro {
    text-align: center;
    padding: 15px 10px;
}

.category-intro p {
    margin: 5px 0;
    line-height: 1.4;
}

.area-title {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 5px;
}

/* --- Category icons --- */
.category-icons {
    margin: 0 auto;
    width: 90%;
    border: 0;
}

.category-icons td {
    text-align: center;
    vertical-align: top;
    padding: 5px;
}

.spacer {
    width: 5%;
}

/* --- Cookie consent banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333333;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 13px;
    padding: 14px 20px;
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-banner a {
    color: #ffffff;
    text-decoration: underline;
    font-size: 13px;
}

.cookie-banner button {
    background: #0000dd;
    color: #ffffff;
    border: 0;
    padding: 8px 18px;
    font-size: 13px;
    cursor: pointer;
    font-weight: bold;
}

.cookie-banner button:hover {
    background: #0000ff;
}

/* ===== Mobile responsive ===== */
@media screen and (max-width: 768px) {
    .page-wrapper {
        width: 100%;
        padding: 0;
    }
    .home-wrap {
        padding-top: 10px;
    }
    .site-header {
        font-size: 17px;
        line-height: 1.35;
        padding: 10px 52px 10px 8px;
    }
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .site-header-tagline {
        display: block;
        margin: 2px 0 0;
        font-size: 11px;
    }
    .responsive-layout {
        flex-direction: column;
    }

    /* --- Slide-in right panel --- */
    .responsive-layout .home-right {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 270px;
        max-width: 80vw;
        z-index: 9100;
        background: #fff;
        box-shadow: -3px 0 16px rgba(0,0,0,0.2);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    .responsive-layout .home-right.panel-open {
        transform: translateX(0);
    }

    /* Panel header */
    .mobile-panel-header {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 14px 12px;
        background: #0000dd;
        color: #fff;
        font-family: Arial, sans-serif;
        font-size: 15px;
        font-weight: bold;
        flex-shrink: 0;
        position: relative;
    }
    .mobile-panel-close {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 34px;
        height: 34px;
        border: none;
        background: rgba(255,255,255,0.15);
        color: #fff;
        border-radius: 6px;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-panel-close:active {
        background: rgba(255,255,255,0.3);
    }

    /* Panel content area */
    .mobile-panel-content {
        flex: 1;
        overflow-y: auto;
        padding: 0;
    }

    /* Override table layout to fill panel edge-to-edge */
    .responsive-layout .home-right .rightmenutable {
        display: block !important;
        width: 100% !important;
        margin: 0;
        border: none;
    }
    .responsive-layout .home-right table.rightmenutable tbody {
        display: block;
        width: 100%;
    }
    .responsive-layout .home-right table.rightmenutable tr {
        display: block;
        width: 100%;
    }
    .responsive-layout .home-right table.rightmenutable th {
        display: block;
        width: 100%;
        background: #0000dd;
        color: #fff;
        font-family: Arial, sans-serif;
        font-size: 12px;
        font-weight: bold;
        text-align: center !important;
        padding: 7px 12px;
        box-sizing: border-box;
    }
    .responsive-layout .home-right table.rightmenutable td {
        display: block;
        width: 100%;
        background: #fff;
        font-family: Arial, sans-serif;
        font-size: 14px;
        color: #000;
        text-align: center !important;
        padding: 0;
        border-bottom: 1px solid #f0f0f0;
        box-sizing: border-box;
    }
    .responsive-layout .home-right table.rightmenutable tr:last-child td {
        border-bottom: none;
    }
    .responsive-layout .home-right table.rightmenutable td a {
        display: block;
        padding: 12px 12px;
        color: #0000ff;
        font-weight: bold;
        text-decoration: none;
    }
    .responsive-layout .home-right table.rightmenutable td a:active {
        background: #eeeeff;
    }

    /* Promo table in mobile panel */
    .responsive-layout .home-right table.rightmenutable.promo-table th {
        background: linear-gradient(135deg, #1a1a6e, #4400aa);
    }
    .responsive-layout .home-right table.rightmenutable.promo-table td a {
        color: #4400aa;
    }

    /* Body scroll lock when panel is open */
    body.mobile-panel-active {
        overflow: hidden;
    }

    .category-icons {
        width: 100%;
    }
    .category-icons td {
        padding: 3px;
    }
    .category-icons img {
        max-width: 100%;
        height: auto;
    }
    .spacer {
        display: none;
    }
    .cookie-banner {
        font-size: 12px;
        padding: 10px;
        flex-direction: column;
        gap: 8px;
    }
}

/* Hide panel header on desktop */
.mobile-panel-header {
    display: none;
}
