/* Hamburger Menu CSS - Pure CSS Toggle */
.hamburger {
display: none; /* Hide on desktop, show horizontal menu instead */
}
/* Hide the checkbox */
#menu-toggle {
display: none !important;
}

div.statsSelection {
    display: inline;
}

/* Desktop Roster Menu Styles - Match default OBBLM styling */
ul.rosterMenu {
    margin: 0;
    list-style: none;
    padding: 0;
    background-color: transparent;
    border: none;
    font-size: 0;
    width: 100%;
    z-index: 999;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    zoom: 1;
}

ul.rosterMenu > li {
    margin: 0;
    position: relative;
    white-space: nowrap;
    font-size: 0;
}

ul.rosterMenu a {
    display: block;
    vertical-align: middle;
    text-align: left;
    text-decoration: none;
    font: bold 12px Arial, Helvetica, sans-serif;
    color: #000000;
    text-shadow: #FFF 0 0 1px;
    cursor: pointer;
    padding: 4px 10px 4px 10px;
    background-color: #c1c1c1;
    background-image: url("../images/mainbk.png");
    background-repeat: repeat;
    background-position: 0 0;
    border-width: 0 0 0 1px;
    border-style: solid;
    border-color: #C0C0C0;
}

ul.rosterMenu a:hover {
    background-color: #000000;
    border-color: #C0C0C0;
    border-style: solid;
    color: #ffffff;
    text-shadow: #FFF 0 0 1px;
    background-image: url("../images/mainbk.png");
    background-position: 0 100px;
}

/* Mobile Styles */
@media (max-width: 500px) {
    /* banner adjustments */
    body {
        margin: 0;
    }

    div.banner {
        background-position-x: -2px;
        border: none;
        margin: 0;
    }
    div.banner > br {
        display: none;
    }
    f1 {
        display: block !important;
        position: relative;
        width: calc(100% - 212px);
        top: 1px;
        left: 158px;
        line-height: 38px;
        margin: 0;
        padding: 0px;
        height: 85px;
    }
    div.banner > f2 {
        position: relative;
        display: block;
        left: 158px;
        line-height: normal;
        width: calc(100% - 160px);
        margin: 0;
    }
    body, td, th, input, select, textarea {
        font-size: 13px;
    }
    /* help with table overflow */
    div.tableResponsive {
        overflow-x: auto;
    }
    /* table sorting "buttons" */
    table tbody a {
        font-size: 13px;
        padding: 5px;
    }
    /* main page adjustments */
    div.main_leftColumn, div.main_rightColumn {
        width: 100%;
    }
    div.everything {
        word-wrap: break-word;
    }
    div.boxCommon, div.boxCoachPage, div.boxWide {
        width: 99% !important;
        padding: 0;
        margin: 15px 0 !important;
        height: auto !important;
    }
    /* convert coaches table to blocks */
    .coachesTable > table > tbody > tr > td {
        display: block;
    }
    /* skills list table  & 
    /* star players list tables breathing room  */
    div#skillslistbox table.common {
        width: 600px;
    }
    div#starPlayersListBox table.common {
        width: 1350px;
    }
    div#starPlayersListBox tr:nth-child(n+4) td:not(:first-child),
    div#skillslistbox tr:nth-child(n+4) td:not(:first-child) {
        padding: 20px 10px;
        line-height: 1.25;
    }
    /* form elements adjustments */
    div.statsSelection {
        display: block;
        margin: 5px;
    }
    select, input {
        padding: 10px;
    }
    /* the rank selecter is very wide. */
    select[name="rs"] {
        width: 100%;
        font-size: 10px;
    }
    input[type="checkbox" i] {
        width: 20px;
        height: 20px;
        margin: 5px;
    }
    /* league tournament tables */
    div.leaguesNCont {
        font-size: 14px;
    }

    div.leaguesNCont a {
        padding: 5px;
        display: inline-block;
    }
    /* Hamburger Icon */
    .hamburger {
        display: block;
        cursor: pointer;
        padding: 10px;
        background: #333;
        color: white;
        border: 1px solid #5f5f5f;
        font-size: 20px;
        position: fixed;
        top: 0;
        right: 0;
        width: 30px;
        height: 30px;
        z-index: 1001;
    }

    .hamburger::before,
    .hamburger::after,
    .hamburger span {
        content: '';
        display: block;
        width: 30px;
        height: 2px;
        left: 11px;
        background: white;
        position: absolute;
        transition: all 0.3s ease;
    }

    .hamburger span {
        top: 25px;
    }

    .hamburger::before {
        top: 15px;
    }

    .hamburger::after {
        top: 35px;
    }
    div.menu {
        border: none;
    }
    /* Menu Styles */
    ul.css3menu1 {
        display: none !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #333 !important;
        position: fixed !important;
        top: 51px !important; 
        width: calc(100% - 2px) !important;
        z-index: 1000 !important;
        max-height: calc(100% - 52px) !important;
        overflow: auto;
    }

    ul.css3menu1 li {
        border-bottom: 1px solid #555;
        display: block !important;
        width: 100% !important;
        white-space: normal;
    }
    
    ul.css3menu1 ul li {
        margin: 0;
    }

    ul.css3menu1 a {
        padding: 15px !important;
        color: white !important;
        transition: background 0.3s ease !important;
        background: none !important;
        border: none !important;
        line-height: 20px !important;
    }
    
    ul.topmenu > li > a {
        height: auto;
    }

    /* Submenu Styles for Mobile */
    ul.css3menu1 ul {
        display: none !important;
        position: relative !important;
        left: 50px !important;
        border-left: 0;
        top: 0 !important;
        background: #333;
        z-index: 1001;
        padding: 0px;
        border-radius: 0px;
        box-shadow: none;
        border-color: #5f5f5f;
        overflow-y: auto;
        max-height: 48vh;
        width: calc(100% - 50px) !important;
    }

    ul.css3menu1 a:hover {
        background: #555 !important;
    }

    ul.css3menu1 li:hover > ul {
        display: block !important;
    }

    ul li:has(a:hover) > a {
        background: #555 !important;
    }

    /* Toggle Menu on Checkbox Check */
    #menu-toggle:checked ~ ul.css3menu1 {
        display: block !important;
        /* position: fixed !important; */
    }

    /* Animate Hamburger to X */
    #menu-toggle:checked ~ .hamburger span {
        opacity: 0;
    }

    #menu-toggle:checked ~ .hamburger::before {
        transform: rotate(45deg) translate(5px, 10px);
        width: 35px;
    }

    #menu-toggle:checked ~ .hamburger::after {
        transform: rotate(-45deg) translate(5px, -9px);
        width: 35px;
    }
	
	/* Roster Menu Adjustments for Mobile */
    ul.rosterMenu {
        list-style: none !important;
        display: block !important;
        background: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    ul.rosterMenu > li {
        display: inline-flex !important;
        width: 31% !important;
        margin: 5px 2px !important;
        white-space: normal !important;
    }

    ul.rosterMenu a {
        padding: 10px !important;
        display: block !important;
        color: white !important;
        text-decoration: none !important;
        width: 100% !important;
        background: #333 !important;
        border: none !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    /* matches tables */
    .matchesTable tr:nth-child(2),
    .matchesTable tr:nth-child(4),
    .matchesTable tr:nth-child(3),
    .matchesTable tr:nth-last-child(2) {
        display: none !important;
    }

    .matchesTable tr {
        display: block;
        border: 1px black solid;
        position: relative;
    }

    .matchesTable tr td {
        display: block;
        margin: 2px 0px;
    }
    .matchesTable tr:not(:first-child) td:nth-child(-n+3) {
        display: inline-flex;
        width: 32.5%;
    }
    .matchesTable tr:not(:first-child) td:nth-child(2) a {
        text-align: center;
        width: 100%;
    }
    .matchesTable tr:not(:first-child) td:nth-child(3) a {
        text-align: right;
        width: 100%;
    }
    .matchesTable tr td:nth-child(4) {
        width: 100%;
    }

    .matchesTable tr td:nth-child(5) {
        float: left;
    }
    .matchesTable tr td:nth-child(6)  {
        float: right;
    }
    .matchesTable tr td:nth-child(5) i,
    .matchesTable tr td:nth-child(6) i {
        visibility: hidden;
        display: block;
        text-align: center;
        padding: 10px 0px 0px 0px;
    }
    .matchesTable tr td:nth-child(6) i {
        text-align: center;
    }
    .matchesTable tr td:nth-child(5) i a,
    .matchesTable tr td:nth-child(6) i a {
        visibility: visible;
    }

    .matchesTable tr td:nth-last-child(1) {
        clear: both;
        padding: 5px;
        text-align: center;
    }
    .matchesTable tr:nth-last-child(1) {
        display: block;
        height: 35px;
    }
    .matchesTable tr:last-child td:nth-child(1) {
        display: block;
        width: 95%;
    }
    .tourMatches a {
        font-size: 14px;
        color: black;
    }

    .tourMatches td > a {
        display: inline-flex;
    }
    .tourMatches tr  td  i a {
        visibility: visible;
    }

    .tourMatches tr  td  i {
        visibility: hidden;
    }

    td.matchManagement {
        width: 26%;
    }

    td.match.divider {
        display: none;
    }

    .tourMatches {
        color: black;
    }
    /* team about form */
    .teamAbout tr:nth-child(2) td:nth-child(3) form {
        width: 450px;
    }
}

@media (max-width: 470px) {
    f1 {
        top: 1px;
    }
}