/* Basic Reset */
:root {
    --mobile-header-color: #14191f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global body styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    height: 100%;
}

/* Full height setup */
html, body {
    height: 100%;
}

/* Main container to hold all columns */
#layout-container {
    display: flex;
    min-height: 100vh;
}

.rendered-content { display: none; }

.layout-content {
/*    display: flex; */
    display: block;
    padding: 0px;
    margin: 0px;
    min-height: 100vh;
}

#layout-left-column, #layout-center-column, #layout-right-column {
    flex-grow: 1;
    flex-shrink: 0;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-family: verdana;
    font-size: 14px;
    transform-origin: left top;
    padding: 0px;
    margin: 0px;
}

/* Left and Right Columns */
#layout-left-sidebar, #layout-right-sidebar {
    flex: 1;
    height: 100vh;
}

/* Main site content */
#layout-main {
    width: 946px; /* Default width */
    max-width: 946px;
    min-width: 840px;
    min-height: 100vh;
    display: flex;
    box-shadow: -0px 0px 8px rgba(0, 0, 0, 0.5), 0px 0px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    background-color: white;
    overflow-y: auto;
    transform-origin: top;

    scroll-snap-type: x mandatory;
    scroll-snap-align: start;
    scroll-snap-stop: always;
/*    scroll-behavior: smooth; */
    overflow-x: auto;
}

/* Inside Center Column */
#layout-left-column {
    border-left: 1px solid #ffffffc0;
}

#layout-center-column {
/*
    scroll-snap-type: x mandatory;
    scroll-snap-align: start;
    scroll-behavior: smooth;
    overflow-x: auto;
*/
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex: 1;
    min-height: 100vh;
    min-width: 410px;
    width: 100%;
    z-index: 2;
    box-shadow: -0px 0px 5px rgba(0, 0, 0, 0.3), 0px 0px 5px rgba(0, 0, 0, 0.3);
}

#layout-center-column .layout-content #main {
    margin: 0 13px;
    overflow-x: hidden;
    overflow-y: visible;
    min-height: 100vh;
}

#layout-right-column {
    border-right: 1px solid #ffffffc0;
}

#layout-left-column, #layout-right-column {
/*
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overflow-x: auto;
*/
    scroll-snap-stop: always;
    scroll-snap-align: start;
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    min-height: 100vh;
    display: flex;
    z-index: 1;
}

/* Mobile Header */
#mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: var(--mobile-header-color);
    color: white;
    position: fixed;
    top: 0px;
    width: 100%;
    z-index: 5;
    height: 40px;
}

/* For iPhones with a notch, use the safe-area-inset to prevent overlap */
@supports(padding: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top); /* Prevent overlap with the notch */
        padding-left: env(safe-area-inset-left); /* Optional: prevent side overlap */
        padding-right: env(safe-area-inset-right); /* Optional: prevent side overlap */
        padding-bottom: env(safe-area-inset-bottom); /* Optional: handle bottom safe area */
    }
}

#mobile-header #mobile-logo {
    font-size: 1.3rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff;
    width: 95%;
}

#mobile-logo div.large {
    font-size: 1.4rem;
    line-height: 1.3rem;
    display: flex;
    float: left;
}

#mobile-logo div.small {
    font-size: 0.5rem;
    line-height: 0.65rem;
    display: flex;
    float: left;
    text-align: left;
    margin-left: 8px;
}

/* Hamburger Menu Icon */
.hamburger-menu {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 20px;
    width: 20px;
    float: right;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
}

#mobile-menu {
    position: fixed;
    overflow: scroll;
    color: white;
    height: 100vh;
    background-color: var(--mobile-header-color);
    box-shadow: -2px 0px 2px #4448;
    border-left: 1px solid #eee;
    right: 0px;
    width: 240px;
    max-width: 240px;
    min-width: 240px;
}

#mobile-menu-content {
    display: none;
    position: absolute;
    background-color: var(--mobile-header-color);
    width: 100%;
    z-index: 4;
    text-align: left;
    left: 0px;
    margin: 0px;
    top: 40px;
}

#mobile-menu-content li {
    margin-left: 0px;
    left: 0px;
    list-style-type: none;
}

#mobile-menu-content.show {
    display: block;
    overflow: scroll;
}

#mobile-menu-content li {
    border-top: 1px solid #333;
    padding: 13px 15px;
}

#mobile-menu-content li i {
    width: 16px;
    height: 16px;
    color: #eee;
    float: left;
    margin-right: 10px;
    display: inline-block;
    line-height: 15px;
}

#mobile-menu-content li a {
    display: block;
    text-decoration: none;
    color: #eee;
    font-size: 16px;
    line-height: 16px;
    font-family: Verdana;
    margin-left: 26px;
}

#mobile-menu-content li a:hover {
    background-color: #234;
}

div#mobile-zone {
    float: right;
    min-width: 15px;
    max-width: 50px;
    margin-right: 20px;
    display: block;
    float: right;
}

div#mobile-zone #zone-selector {
    background-color: transparent;
    color: white;
    border: 0px;
    -webkit-appearance: none;  /* For Chrome, Safari, Edge */
    -moz-appearance: none;     /* For Firefox */
    appearance: none;          /* Standard */
}

div#mobile-user {
    float: right;
    width: 21px;
    height: 19px;
    margin-right: 20px;
}

div.logged_out i { line-height: 19px; font-size: 17px; }

div.logged_in {
    border: 1px solid white;
    border-radius: 5px;
    vertical-align: middle;
}
div.logged_in i { line-height: 17px; font-size: 11px; }

#footer-login {
  align-items: center;
  width: 100%;
  text-align: center;
}

#footer-login input {
  padding: 5px;
  margin-right: 5px;
  border: none;
  border-radius: 3px;
  width: 25%;
  min-width: 25px;
}

#footer-login button {
  padding: 5px 10px;
  background-color: #598bb6;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

#footer-login button:hover {
  background-color: #006699;
}

.register-link {
  color: white;
  margin-left: 3px;
  text-decoration: none;
}

.register-link:hover {
  text-decoration: underline;
}

.ginfotable .nick { max-width: 100px; overflow: hidden; display: block; text-overflow: ellipsis; }

/* Responsive Styles */

@media (max-width: 1200px) {
    .bg-awards-left, .bg-awards-right {
        display: none;
    }
}

@media (max-width: 970px) {
    #layout-left-sidebar, #layout-right-sidebar {
        display: none;
    }
    #layout-main {
        max-width: 100%;
        min-width: 100%;
    }
}

@media (min-width: 841px) {
    #layout-main {
        padding-top: 0px;
    }

    #layout-left-column, #layout-right-column { display: flex; }

    #mobile-menu {
        display: none;
    }

    #mobile-menu #mobile-menu-content {
        display: none;
    }

    #mobile-menu.show {
        display: none;
    }

    #mobile-menu.show #mobile-menu-content {
        display: none;
    }
}

@media (max-width: 840px) {
    #layout-left-column, #layout-right-column {
        /* display: none; */
        border: 0px;
    }
    /* Show the mobile menu at the top */
    #mobile-menu {
        display: block;
        top: 0;
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    #login-container { padding-bottom: 50px }

    #layout-container { top: 40px; left: 0px; position: absolute; display: flex; width: 100%; }
    #layout-center-column {
        width: 100%;
        background-color: white;
    }

    #mobile-header {
        display: flex;
        position: fixed;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid #fff;
    }

    #layout-left-column {
        display: none;
 /*       position: absolute; */
        left: 0px;
        transition: left 0.3s ease; /* Smooth transition for right column */
    }

    #layout-right-column {
        display: none;
/*        position: absolute; */
        right: 0px; /* Initially hidden */
        transition: right 0.3s ease; /* Smooth transition for right column */
    }

    #layout-center-column .layout-content #main {
        margin: 0px 8px;
    }

    #mobile-menu {
        display: none;
    }

    #mobile-menu #mobile-menu-content {
        display: none;
    }

    #mobile-menu.show {
        display: flex;
        z-index: 4;
    }

    #mobile-menu.show #mobile-menu-content {
        display: block;
        z-index: 4;
    }

    #title {
        background-color: #fff;
        background: #fff;
        color: #000 !important;
        font-weight: bold;
    }

    .news-rss { font-size: 12px; }
    .news-mlhp { font-size: 11px; }

    td.mininews a, td.mininews a b, a.rss { font-size: 11px !important; line-height: 12px !important; }
    td.newshead, td.news, td.news a, td.news li, td.news p { font-size: 1.2em !important; }
}

@media (max-width: 600px) {
    .mobile-smaller, .mobile-smaller td, .mobile-smaller a { font-size: 0.98em !important; }
    .mobile-smallest, .mobile-smallest td, .mobile-smallest a { font-size: 0.94em !important; }
}

@media (max-width: 540px) {
    #layout-center-column {
        transform-origin: top;
        min-width: 320px;
    }

    #layout-center-column .layout-content #main {
        margin: 0px 4px;
    }

    .mobile-hide, .mobile-hidden {
        display: none;
    }

    .mobile-smaller, .mobile-smaller td, .mobile-smaller a { font-size: 0.95em !important; }

    .mobile-smallest, .mobile-smallest td, .mobile-smallest a { font-size: 0.9em !important; }

    .mobile-nopadding {
        padding: 0px !important;
        margin: 0px !important;
    }

    .news-rss { font-size: 11px; }
    .news-mlhp { font-size: 10px; }
    .page_menu { font-size: 10px; padding-right: 0px; }
    .ginfotable .nick { max-width: 75px; }
    div.gamemenu a { padding: 0 5px; }
    td.newshead, td.news, td.news a, td.news li, td.news p { font-size: 1.3em !important; }
}

@media (max-width: 450px) {
    .page_menu { font-size: 9px; }
    td.newshead, td.news, td.news a, td.news li, td.news p { font-size: 1.4em !important; }
    table.send_mono tr td { font-size: 0.9em; line-height: 1.2em; }
    table.send_mono tr td small { font-size: 0.9em; line-height: 1.2em; }
    table.lhp_real_game_note, table.lhp_real_game_note tr td { font-size: 0.9em !important; }
    table#teams-face-to-face, table#teams-face-to-face tr td { font-size: 0.9em !important; }
}

@media (max-width: 430px) {
    .page_menu { font-size: 8px; }
}

@media (max-width: 407px) {
    .page_menu { font-size: 9px; }
    div#mobile-logo div.large { font-size: 17px; line-height: 15px; }
    div#mobile-logo div.small { font-size: 8px; line-height: 8px; margin-left: 6px; }
}

@media (max-width: 360px) {
    .page_menu { font-size: 10px; }
    div#mobile-zone { margin-right: 10px; }
    div#mobile-user { margin-right: 10px; }
    div#mobile-logo div.large { font-size: 16px; line-height: 14px; }
    div#mobile-logo div.small { font-size: 7px; line-height: 7px; margin-left: 5px; }
}

@media (max-width: 340px) {
    .page_menu { font-size: 11px; }
}
