.scroller {
    padding-left: 10px;
}

.wrapper {
    display: table;
    width: 100%;
    padding-left: 375px;
}

.wrapper>div {
    float: none;
    display: table-cell;
}

.wrapper>div li {
    list-style-type: none;
}

.wrapper>div:first-child>ul>ul li:nth-child(2) {
    padding: 5px 0;
}

.wrapper>div>ul li:nth-child(2) {
    border: 2px solid #000;
    border-left: 0;
    text-align: center;
    font-weight: bold;
}

.wrapper>div>ul>li:nth-child(2) {
    padding: 40px 0;
}

.wrapper>div:not(:first-child) ul li:nth-child(2)::before {
    position: absolute;
    content: "";
    width: 25px;
    height: 2px;
    background-color: #000;
    right: 100%;
    top: -2px;
}

.wrapper>div:not(:first-child) ul li:nth-child(2)::after {
    position: absolute;
    content: "";
    width: 25px;
    height: 2px;
    background-color: #000;
    right: 100%;
    bottom: -2px;
}

.wrapper>div:nth-child(4):not(.winner):not(.consolation) ul {
    transform: translateY(125px);
}

.wrapper>div:nth-child(4):not(.winner):not(.consolation) ul li:nth-child(2) {
    padding: 150px 0;
}

.wrapper>div:nth-child(4):not(.winner):not(.consolation) ul+ul {
    padding-top: 268px;
}

.wrapper>div:nth-child(5):not(.winner):not(.consolation) ul {
    transform: translateY(285px);
}

.wrapper>div:nth-child(5):not(.winner):not(.consolatoion) ul li:nth-child(2) {
    padding: 315px 0;
}

.wrapper>div.winner {
    vertical-align: middle;
}

.wrapper {
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important;
}

.wrapper>div>ul {
    position: relative;
}

.wrapper>div ul li {
    font-size: 12px;
    padding-left: 10px;
}

.wrapper>div>ul>ul {
    min-width: 275px;
}


/*will be  removing it later*/

.wrapper>div:first-child>ul+ul {
    margin-top: 73px;
    padding-top: 0;
}

.wrapper ul {
    padding-left: 0;
}

.wrapper>div:not(:first-child) ul li:nth-child(2) {
    padding: 102px 0;
}

.wrapper>div:not(:first-child) ul li:nth-child(2)::before,
.wrapper>div:not(:first-child) ul li:nth-child(2)::after {
    display: none
}


/*recent changes*/

.wrapper {
    margin-bottom: 50px;
}

.wrapper li {
    min-height: 24px;
    box-sizing: content-box;
    -webkit-box-sizing: content-box;
}

.wrapper>div:nth-child(4):not(.winner):not(.consolation) ul {
    transform: translateY(365px);
}

.wrapper>div:nth-child(4):not(.winner):not(.consolation) ul li:nth-child(2) {
    padding: 399px 0;
}

.wrapper>div>span {
    display: block;
    width: 80%;
    text-align: center;
    background-color: #c5d9f1;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 30px;
}

.wrapper {
    position: relative;
}

.wrapper>div>span {
    visibility: visible;
}

.wrapper>div>span.yes {
    visibility: visible;
}

.wrapper>div:first-child>span:nth-child(2) {
    position: absolute;
    left: 15px;
    top: 0;
    max-width: 275px;
}

.wrapper>div ul li,
.wrapper>div:first-child>ul>ul li:nth-child(2) {
    white-space: nowrap;
    padding-left: 5px;
}

.scroller {
    overflow-x: scroll;
    border: 1px solid #ccc;
}

.wrapper+div {
    margin-left: 25px;
}

.scroller .header-content {
    position: relative;
    padding: 20px;
}

.scroller .header-content img {
    width: 15%;
    min-width: 160px;
}

.scroller .consolation li {
    padding-left: 5px;
    padding-right: 5px;
}

.wrapper>div.consolation {
    vertical-align: middle;
    position: relative;
    padding-left: 30px;
}

.wrapper>div.consolation>span {
    position: absolute;
    top: 0;
}

.scroller .header-content h5 {
    text-align: center;
    font-weight: bold;
}

.scroller>a {
    position: absolute;
    background-image: url(/sites/all/modules/amerileague/images/print.png);
    display: block;
    width: 42px;
    height: 42px;
    font-size: 0;
    right: 15px;
    top: 15px;
    z-index: 99;
}

.dynamic-brackets-container {
    position: relative;
}

.scroller .wrapper>div.consolation {
    display: none;
}

.scroller .wrapper>div.consolation.yes {
    display: table-cell;
}

.scroller .wrapper>div>span.yes {
    visibility: visible;
}

.wrapper>div>ul li:nth-child(2) {
    position: relative;
    padding-right: 45px !important;
}

.wrapper>div>ul li:nth-child(2) span:not(.date-display-single) {
    position: absolute;
    right: 5px;
    color: #e44d04;
    top: 50%;
    -o-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}


/*for wrapping items within a scroller*/

.wrapper div ul li:nth-child(2) {
    padding-left: 45px !important;
}

.wrapper div ul li:nth-child(2) a {
    display: block;
}


/*css for recent fix*/

.wrapper>div:nth-child(2):not(.winner):not(.consolation) ul {
    -o-transform: translateY(66px);
    -ms-transform: translateY(66px);
    -moz-transform: translateY(66px);
    -webkit-transform: translateY(66px);
    transform: translateY(66px);
}

.wrapper>div:nth-child(2) ul+ul {
    margin-top: 202px;
    padding-top: 0;
}

.wrapper>div:nth-child(3):not(.winner):not(.consolation) ul {
    -o-transform: translateY(195px);
    -ms-transform: translateY(195px);
    -moz-transform: translateY(195px);
    -webkit-transform: translateY(195px);
    transform: translateY(195px);
}

.wrapper>div:nth-child(3):not(.winner):not(.consolation) ul li:nth-child(2) {
    padding: 228px 0;
}

.wrapper>div:nth-child(3):not(.winner):not(.consolation)>ul+ul {
    margin-top: 455px;
}

.wrapper>div:nth-child(4):not(.winner):not(.consolation) ul {
    -o-transform: translateY(449px);
    -ms-transform: translateY(449px);
    -moz-transform: translateY(449px);
    -webkit-transform: translateY(449px);
    transform: translateY(449px);
}

.wrapper>div:nth-child(4):not(.winner):not(.consolation) ul li:nth-child(2) {
    padding: 481px 0;
}

.wrapper>div:first-child ul>ul:nth-child(4) {
    position: absolute;
    right: 100%;
    top: -28px;
    bottom: auto;
}

.wrapper>div:first-child ul>ul:nth-child(4):last-child.bottom,
.wrapper>div:first-child ul>ul:nth-child(5) {
    position: absolute;
    right: 100%;
    bottom: -28px;
    top: auto;
}

.wrapper>div ul>li:nth-child(2) {
    min-height: 48px;
}

.wrapper>div.consolation ul li:nth-child(2) {
    padding: 102px 45px 102px 20px !important;
}

ul.top li:nth-child(2),
ul.bottom li:nth-child(2),
ul.nothing li:nth-child(2) {
    display: table-cell;
    height: 48px;
    vertical-align: middle;
}

.winner,
.consolation {
    padding-top: 63px;
}

/*media styling for print functionality*/

@media print {
    @page {
        margin: 0;
        size: legal;
    }
    body {
        margin: 0.5cm;
    }
    html body>div:not(.dexp-body-inner) {
        display: none;
    }
    .dexp-body-inner>div,
    .dexp-body-inner>section:not(#section-main-content) {
        display: none;
    }
    .dynamic-brackets-container~table,
    .view-filters {
        display: none;
    }
    /*codes to display content in print*/
    #section-main-content .view-schedule .view-filters {
        display: none;
    }
    .view-display-id-page_9>.view-header,
    .view-display-id-page_7>.view-header>.view-content {
        display: none;
    }
    /*ends*/
    .scroller {
        display: block;
        width: auto;
        height: auto;
        overflow: visible;
        border: none;
        -o-transform-origin: 0 0;
        -ms-transform-origin: 0 0;
        -moz-transform-origin: 0 0;
        -webkit-transform-origin: 0 0;
        transform-origin: 0 0;
    }
    .scroller.three {
        -o-transform: scale(.7);
        -ms-transform: scale(.7);
        -moz-transform: scale(.7);
        -webkit-transform: scale(.7);
        transform: scale(.7);
    }
    .scroller.four {
        -o-transform: scale(.6);
        -ms-transform: scale(.6);
        -moz-transform: scale(.6);
        -webkit-transform: scale(.6);
        transform: scale(.6);
    }
    .scroller.five {
        -o-transform: scale(.4);
        -ms-transform: scale(.4);
        -moz-transform: scale(.4);
        -webkit-transform: scale(.4);
        transform: scale(.4);
    }
    .scroller.six {
        -o-transform: scale(.3);
        -ms-transform: scale(.3);
        -moz-transform: scale(.3);
        -webkit-transform: scale(.3);
        transform: scale(.3);
    }
    a[href]:after {
        content: none !important;
    }
    div.winner {
        position: relative;
    }
    div.winner ul,
    .wrapper>div.consolation ul {
        position: absolute;
        top: 50%;
        -o-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
        -moz-transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
        transform: translateY(-50%);
    }
    .wrapper>div.consolation {
        padding-left: 300px;
    }
}

/* New CSS for Tournament Bracket */

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.header-content-logo {
    width: 15%;
}

.header-content-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 85%;
    text-align: center;
    max-width: 932px;
}

.winner-name {
    font-size: 1rem !important;
}

/*************************************** Mobile CSS ***************************************/

.mobile-container {
  display: none;
}

@media (max-width: 767.98px) {
  .dynamic-brackets-container {
    display: none !important;
  }

  .mobile-container {
    display: block;
  }
}
/* Mobile Container */
.mobile-container {
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(to bottom, #f9fafb, #ffffff);
}

/* Header Styles */
.mobile-header {
    background: linear-gradient(to bottom right, #ffffff, #f9fafb, #f3f4f6);
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
}

.mobile-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.mobile-logo-circle {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(to bottom right, #f97316, #ea580c);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.mobile-logo-inner {
    width: 1.75rem;
    height: 1.75rem;
    background-color: #ffffff;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-logo-dot {
    width: 1rem;
    height: 1rem;
    background: linear-gradient(to bottom right, #f97316, #ea580c);
    border-radius: 9999px;
}

.mobile-title {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(to right, #1e40af, #1e3a8a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mobile-subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, #f97316, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.mobile-group-name {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

/* Round Navigation */
.mobile-round-nav {
    background: linear-gradient(to right, #1e40af, #1e3a8a, #1e40af);
    display: flex;
    border-radius: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Round Navigation Tabs Container */
.mobile-round-nav {
    display: flex;
    background: linear-gradient(to right, #1e40af, #1e3a8a, #1e40af);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0;
}

/* Base Tab Style */
.mobile-round-tab {
    flex: 1;
    padding: 1rem 0.5rem;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    color: #bfdbfe;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    border: 0;
    border-radius: 0;
}

.mobile-round-tab.active {
    color: #ffffff;
    background: linear-gradient(to bottom, #1d4ed8, #1e40af);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.mobile-round-tab:focus {
    outline: none;
    border: 0 !important;
    border-radius: 0;
    color: #ffffff !important;
}

/* Games Container */
.mobile-games-container {
    background: linear-gradient(to bottom, #1e3a8a, #1e40af, #1e3a8a);
    min-height: 100vh;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Game Card */
.mobile-game-card {
    background: linear-gradient(to bottom right, #1e40af, #1e40af, #1e3a8a);
    border-radius: 1rem;
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.5);
    position: relative;
}

.mobile-game-header {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
    padding: 1.25rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(37, 99, 235, 0.3);
}

.mobile-game-info {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mobile-game-location {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bfdbfe;
    font-size: 0.75rem;
}

.mobile-game-location a {
    color: #bfdbfe;
    font-size: 0.75rem;
}

.location-icon {
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.25rem;
}

.mobile-game-content {
    padding: 0;
}

/* Team Styles */
.mobile-game-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.5);
}

.mobile-game-team.winner {
    background: linear-gradient(to right, rgba(22, 163, 74, 0.2), rgba(21, 128, 61, 0.2));
    border-color: rgba(74, 222, 128, 0.3);
}

.team-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.team-initial {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: linear-gradient(to bottom right, #facc15, #ca8a04);
}

.team-initial.away {
    background: linear-gradient(to bottom right, #ec4899, #db2777);
}

.team-initial span {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.team-name-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-name {
    font-weight: 600;
    color: #ffffff;
}

.trophy-icon {
    width: 1rem;
    height: 1rem;
    color: #facc15;
}

.trophy-icon.orange {
    color: #f97316;
}

.team-scores {
    display: flex;
    gap: 0.5rem;
}

.team-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.team-score-single {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

/* Next Game Info */
.mobile-next-game {
    padding: 0 1.25rem 1rem;
}

.next-game-wrapper {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(251, 146, 60, 0.3);
}

.next-game-content {
    display: flex;
    background: linear-gradient(to right, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.2));
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(251, 146, 60, 0.3);
    justify-content: space-between;
}

.next-game-info {
    display: flex;
    gap: 10px;
}

.next-game-info span {
    color: #fed7aa;
    font-size: 0.75rem;
    font-weight: 500;
}

.next-game-details {
    display: flex;
    gap: 0.5rem;
}

.next-game-details span {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
}

.arrow-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: #f97316;
}

/* Game Connector */
.mobile-game-connector {
    position: relative;
    display: none;
}

.mobile-game-connector.active {
    display: block;
}

.game-connector-dot {
    position: absolute;
    right: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
}

.connector-line {
    width: 1rem;
    height: 1px;
    background-color: #f97316;
}

.connector-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #f97316;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dot-inner {
    width: 0.25rem;
    height: 0.25rem;
    background-color: #ffffff;
    border-radius: 9999px;
}

/*************************************** End of Mobile CSS ***************************************/
