/* =========================================
   MOBILE LAYOUT
   DouzePoints
========================================= */

/* Hide burger on desktop */
.mobile-menu-toggle {
  display: none;
}


/* =========================================
   TABLET / MOBILE
========================================= */

@media (max-width: 768px) {

  /* GENERAL */

  body {
    overflow-x: hidden;
  }

  .container {
    flex-direction: column;
  }

  .main-content {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }


  /* HEADER */

  .header-overlay {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px;
  }

  .banner-static {
    height: 160px;
  }

  .banner-static img {
    object-fit: cover;
  }

  .header-right {
    display: none;
  }


  /* BURGER MENU */

  .mobile-menu-toggle {
    display: block !important;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10001;

    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;

    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;

    padding: 10px 14px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
  }

  #mobile-nav,
  .header-links {
    display: none !important;
  }

  #mobile-nav.mobile-open,
  .header-links.mobile-open {
    display: block !important;
    position: absolute;
    top: 56px;
    left: 12px;
    right: 12px;

    background: rgba(15, 17, 26, 0.98);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;

    padding: 12px;
    z-index: 10000;
    box-sizing: border-box;
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin: 0;
    padding: 0;

    list-style: none;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a,
  .nav-link,
  .home-link {
    display: block;
    width: 100%;

    padding: 12px;
    box-sizing: border-box;

    color: #ffffff;
    text-decoration: none;

    border-radius: 8px;
    font-size: 0.9rem;
  }

  .nav-menu a:hover,
  .nav-link:hover,
  .home-link:hover {
    background: #e50914;
    color: #ffffff;
  }


  /* NATIONAL FINALS DROPDOWN */

  .dropdown-menu,
  .nf-dropdown-two-col {
    position: static;
    display: block;

    width: 100%;
    max-height: 260px;
    overflow-y: auto;

    margin-top: 6px;
    padding: 8px;

    background: rgba(0,0,0,0.35);
    border-radius: 8px;

    box-sizing: border-box;
  }

  .nf-dropdown-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .nf-dropdown-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nf-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 10px !important;
  }

  .nf-dropdown-flag {
    width: 22px;
    height: 22px;

    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
  }


  /* SIDEBAR */

  .sidebar {
    display: none;
  }


  /* SORTING CONTROLS */

  .header-bar {
    flex-direction: column !important;
    align-items: stretch !important;

    margin: 0 0 15px 0 !important;
  }

  .sort-controls {
    justify-content: center;
    padding-right: 0 !important;
  }

  #sort-options {
    width: 100% !important;
    max-width: 300px;
  }


  /* VIDEO GRIDS */

  .grid-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .video-item {
    flex: none;
    margin-right: 0;
  }


  /* HIDE FAVORITE HEART ON MOBILE */

  button.favorite-btn,
  .favorite-btn {
    display: none !important;
    visibility: hidden !important;
  }


  /* HOMEPAGE CAROUSELS */

  .carousel-wrapper {
    position: relative;
  }

  .carousel-container {
    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  .carousel-track {
    display: flex;
    gap: 12px;

    scroll-snap-type: x mandatory;
  }

  .carousel-track .video-item,
  .carousel-track .carousel-video-item {
    min-width: 80vw;
    scroll-snap-align: start;
  }

  .carousel-button {
    display: flex !important;
    align-items: center;
    justify-content: center;

    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 34px;
    height: 54px;

    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;

    border: none;
    border-radius: 6px;

    font-size: 24px;
    font-weight: bold;

    z-index: 20;
    cursor: pointer;
  }

  .carousel-button:first-child {
    left: 4px;
  }

  .carousel-button:last-child {
    right: 4px;
  }


  /* VIDEO CARDS */

  .video-title-with-icon {
    flex-wrap: wrap;
  }

  .score-wrapper {
    width: auto;
    padding-right: 0;
  }


  /* SCOREBOARD */

  .table-header-row {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .table-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 1000px;
  }


  /* SHOWS PAGE */

  .shows-track {
    grid-template-columns: 1fr;
  }


  /* MODAL VIDEO PLAYER */

  #videoModal .modal-content {
    width: 100vw;
    height: auto;
    max-height: none;

    border-radius: 0;
  }

  #videoModal video,
  #videoModal iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
  }


  /* LOGIN / SIGNUP */

  #auth-modal,
  #signup-modal {
    width: 95vw;
    padding: 20px;
  }

  .auth-buttons,
  .signup-buttons {
    flex-direction: column;
  }

  .auth-buttons button,
  .signup-buttons button {
    width: 100%;
  }


  /* SECTION HEADERS */

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .section-header h4 {
    font-size: 1.2rem;
  }

  .view-more {
    font-size: 0.8rem;
  }

}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 480px) {

  .banner-static {
    height: 120px;
  }

  h4 {
    font-size: 1.1rem;
  }

  .section-header h4 {
    font-size: 1.1rem;
  }

  .video-title-text {
    font-size: 0.8rem;
  }

  .score-circle {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

}


/* =========================================
   POSITION AND SCORE ICONS
========================================= */

@media (max-width: 768px) {

  .video-title-with-icon {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .flag-icon {
    grid-column: 1;
  }

  .video-title-text {
    grid-column: 2;
  }

  .score-wrapper,
  .score-box {
    grid-column: 3;
    width: auto;
    padding-right: 0;
    justify-content: flex-end;
  }

  .score-table {
    width: auto;
  }

  .score-table th {
    font-size: 10px;
    padding-bottom: 6px;
  }

  .score-table td {
    padding: 0;
  }

  .score-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}


@media (max-width: 768px) {

  .video-item {
    position: relative;
    padding-bottom: 70px;
  }

  .score-wrapper,
  .score-box {
    position: absolute;
    right: 18px;
    bottom: 18px;

    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;

    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .score-table {
    width: auto !important;
    margin: 0 !important;
  }

  .score-table th,
  .score-table td {
    text-align: center;
    padding: 2px 4px !important;
  }

  .score-table th {
    font-size: 10px;
    color: #ccc;
  }

  .score-circle {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {

  .score-wrapper,
  .score-box,
  .score-table,
  .score-circle {
    display: none !important;
  }

}


/* =========================================
   COUNTRY AND EDITION DROPDOWNS 
========================================= */

.mobile-page-selector {
  display: none;
}

@media (max-width: 768px) {

  .mobile-page-selector {
    display: block;
    margin: 0 0 16px 0;
    padding: 0 4px;
  }

  .mobile-page-selector label {
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-page-selector select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: #ffffff;
    color: #111111;
    font-family: inherit;
    font-size: 15px;
  }
}
