/* ✨ Popup Modal Styles */
#selectionModal .modal-content {
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

#selectionModal .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 1rem;
}

#selectionModal .modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

#selectionModal .btn {
    font-size: 0.85rem;
}

#selectionModal .modal-body {
    padding: 1rem;
}

/* ✨ Search Bar */
#selectionModal #searchInput {
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* ✨ Card Inside Modal */
#selectionModal .card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#selectionModal .card:hover {
    background: #e2f0ff;
    transform: translateY(-2px);
}

/* ✨ Buttons inside Cards */
#selectionModal .toggle-select {
    width: 80%;
    font-weight: bold;
}

/* ✨ Scrollbar inside Modal */
#selectionModal .modal-body::-webkit-scrollbar {
    width: 6px;
}
#selectionModal .modal-body::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 10px;
}
#selectionModal .modal-body::-webkit-scrollbar-track {
    background: #eee;
}

/* save button*/
.sticky-save-btn {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: 90%;
    max-width: 420px;
    background-color: #28a745;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 6px 10px rgba(0,0,0,0.2);
}


/*Modal */

/* ✨ Modal Enhancements */
.modal-header, .modal-body, .modal-footer {
    background-color: #fff;
}
.modal-title {
    font-weight: bold;
}
.modal-body {
    font-size: 15px;
    color: #333;
}
.modal-footer {
    display: flex;
    justify-content: space-between;
}

/* ✨ Toast Enhancements */
.toast-container {
    z-index: 2000; /* Keep toast above all modals */
}
.toast {
    border-radius: 10px;
    font-size: 14px;
}
.toast-body {
    padding: 15px;
    font-weight: bold;
}

/* ✨ Upgrade Modal Specific */
#upgradeDriverList .form-check {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}
#upgradeDriverList .form-check-input:checked ~ .form-check-label {
    font-weight: bold;
    color: #0d6efd;
}

/* ✨ Save Button Enhancements */
@media (max-width: 576px) {
    .sticky-save-btn {
      font-size: 0.95rem;
      padding: 10px 12px;
      bottom: 10px;
    }
  }
  

.driver-card .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.driver-card .badge.bg-warning {
    background-color: gold !important;
    color: black;
    border: 1px solid #b8860b;
}

.driver-card .badge.bg-secondary {
    background-color: #6c757d !important; /* Bootstrap gray */
    color: white;
    border: 1px solid #545b62;
}

.driver-card small {
    color: #555;
    font-size: 0.75rem;
}

.driver-card {
    background: var(--bs-light);
    padding: 10px;
    border-radius: 12px;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
    font-size: 0.9rem;
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.driver-name {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

.driver-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-top: 6px;
}

.driver-card .badge {
    font-size: 0.65rem;
    padding: 3px 6px;
    font-weight: 600;
    border-radius: 6px;
}

.btn-close-sm {
    width: 0.75rem;
    height: 0.75rem;
    padding: 0.25rem;
}

.disabled {
    background-color: #f0f0f0 !important;
    opacity: 0.7;
}   

/* 🛠️ Mobile optimization for driver & constructor tiles */
@media (max-width: 576px) {
    .driver-card {
      padding: 6px !important;
      min-height: 90px;
      font-size: 0.75rem;
      border-radius: 8px;
    }
  
    .driver-name {
      font-size: 0.85rem;
      gap: 4px;
    }
  
    .driver-sub {
      font-size: 0.7rem;
      margin-top: 4px;
    }
  
    .driver-card .badge {
      font-size: 0.55rem;
      padding: 2px 5px;
    }
  
    .btn-close-sm {
      width: 0.6rem;
      height: 0.6rem;
      padding: 0.15rem;
    }
  }
  
  @media (max-width: 576px) {
    .driver-avatar {
      width: 36px !important;
      height: 36px !important;
      font-size: 1rem !important;
    }
  }

  @media (max-width: 576px) {
    h2, h5, .form-label {
      font-size: 1rem !important;
      margin-bottom: 0.25rem;
    }
  
    .team-section {
      margin-top: 1rem;
    }
  
    #freeTransfersDisplay {
      font-size: 0.9rem;
      margin-bottom: 0.5rem;
    }
  }
  @media (max-width: 576px) {
    #chipSelect {
      font-size: 0.8rem;
      padding: 6px;
    }
  
    .mb-4, .mb-3 {
      margin-bottom: 0.75rem !important;
    }
  
    #driverBudgetUsed, #constructorBudgetUsed {
      font-weight: bold;
    }
  }
    
  .page-container {
    padding-bottom: 100px; /* make space for floating save button */
}

.modal-summary-text {
    color: #000; /* Set all text inside to black */
  }

  #selectionModal .modal-header small p {
    margin-bottom: 0.2rem;
  }

  .small-text {
    font-size: 0.8rem;
    color: #000 !important;
  }
  .modal-content {
    border: none !important;
    box-shadow: none !important;
  }

  #unsavedChangesModal .modal-content {
    color: #000; /* Ensure text inside modal is black */
}

#unsavedChangesModal .modal-content,
#unsavedChangesModal .modal-header,
#unsavedChangesModal .modal-body,
#unsavedChangesModal .modal-body p,
#unsavedChangesModal .modal-body strong {
    color: #000 !important;
    background-color: #fff !important;
}


#chipExplanationModal .modal-content,
#chipExplanationModal .modal-body,
#chipExplanationModal .modal-body p,
#chipExplanationModal .modal-body strong {
    color: #000 !important;
    background-color: #fff !important;
}

.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.3); /* Default Bootstrap */
}

.modal {
    background-color: transparent !important; /* remove any solid black */
    box-shadow: none !important;             /* remove dark shadow if any */
    outline: none !important;
}

.modal-title#saveSummaryModalLabel {
  color: #000 !important;
  font-weight: 700;
}



  