@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Roboto:wght@400;500;700&display=swap");

/* Styling for international telephone input support */
.iti {
  width: 100%;
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Roboto", sans-serif;
}

.main-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #FFFFFF;
  padding: 0px 20px 100px;
}

.form-wrapper {
  width: 100%;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.header-banner {
  width: 100%;
}

.header-banner img {
  width: 100%;
  display: block;
  border-radius: 0;
}

.form-container {
  width: 100%;
  max-width: 650px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  animation: fadeIn 0.8s ease-out;
}

.form-body {
  padding: 30px 40px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group.form-group-spaced {
  margin-bottom: 60px;
}

.form-group label {
  display: block;
  color: #2C3345;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.form-group label.required::after {
  content: " *";
  color: #1b7ea5;
}

.form-group .form-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #2C3345;
  margin: 20px 0 10px;
  text-decoration: none;
}

.form-group .form-main-subtitle {
  font-size: 16px;
  font-weight: 800;
  color: #1b7ea5;
  margin: 25px 0 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #1b7ea5;
  padding-bottom: 5px;
}

.form-group .checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
}

.form-group .checkbox-grid .checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.form-group .checkbox-grid .checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #1b7ea5;
}

.form-group .checkbox-grid .checkbox-item label {
  color: #666666;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 0;
  line-height: 1.4;
  cursor: pointer;
  text-transform: none;
}

.form-group .form-control,
.form-group .form-select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #2C3345;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group .form-control:focus,
.form-group .form-select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1b7ea5;
  box-shadow: 0 0 0 3px rgba(237, 108, 45, 0.2);
}

.form-group .form-control::placeholder,
.form-group .form-select::placeholder,
.form-group textarea::placeholder {
  color: #999 !important;
  font-size: 13px;
}

.was-validated .form-group .form-control:invalid,
.form-group .form-control.is-invalid,
.was-validated .form-group .form-select:invalid,
.form-group .form-select.is-invalid,
.was-validated .form-group textarea:invalid,
.form-group textarea.is-invalid {
  border-color: #dc3545 !important;
}

.was-validated .form-group .form-control:invalid:focus,
.form-group .form-control.is-invalid:focus,
.was-validated .form-group .form-select:invalid:focus,
.form-group .form-select.is-invalid:focus,
.was-validated .form-group textarea:invalid:focus,
.form-group textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}

.form-group .form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M1 4l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
  background-size: 12px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  padding-right: 40px;
}

.form-group .form-select.show {
  border-color: #1b7ea5;
  box-shadow: 0 0 0 3px rgba(237, 108, 45, 0.2);
}

.form-group .custom-dropdown {
  width: 100%;
}

.form-group .custom-dropdown .dropdown-clear-btn {
  position: absolute;
  right: 33px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 5px;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
}

.form-group .custom-dropdown .dropdown-clear-btn:hover {
  color: #555;
}

.form-group .custom-dropdown .form-select::after {
  display: none;
}

.form-group .custom-dropdown .form-select.selected {
  color: #2C3345;
}

.form-group .custom-dropdown .form-select:not(.selected) {
  color: #999;
}

.form-group .custom-dropdown .dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 15px !important;
}

.form-group .custom-dropdown .dropdown-menu .checkbox-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 10px;
  border-radius: 4px;
  transition: background 0.2s;
}

.form-group .custom-dropdown .dropdown-menu .checkbox-item:hover {
  background-color: #f8f9fa;
}

.form-group .custom-dropdown .dropdown-menu .checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #1b7ea5;
}

.form-group .custom-dropdown .dropdown-menu .checkbox-item label {
  margin-bottom: 0;
  color: #666666;
  font-size: 13px;
}

.form-group .policy-instruction {
  font-size: 14px;
  font-weight: 500;
  color: #2C3345;
  margin-bottom: 12px;
}

.form-group .policy-list {
  padding-left: 18px;
  margin-bottom: 25px;
  list-style-type: disc;
}

.form-group .policy-list li {
  color: #666666;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.form-group .policy-list li::marker {
  color: #1b7ea5;
}

.form-group .policy-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 15px;
  margin-bottom: 15px;
}

.form-group .policy-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #1b7ea5;
}

.form-group .policy-checkbox label {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: #666666;
  line-height: 1.4;
  margin-bottom: 0;
  cursor: pointer;
}

.form-group .policy-checkbox label a {
  color: #1b7ea5;
  text-decoration: underline;
  font-weight: 500;
}

.form-group .policy-checkbox label a:hover {
  color: #bf4d13;
  text-decoration: none;
}

.form-group .policy-checkbox .invalid-feedback {
  width: 100%;
  margin-left: 33px;
  margin-top: 4px;
}

.invalid-feedback {
  font-size: 12px;
  margin-top: 5px;
  color: #dc3545;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #1b7ea5;
}

.checkbox-group p {
  color: #666666;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.checkbox-group p a {
  color: #007bff;
  text-decoration: none;
}

.checkbox-group p a:hover {
  text-decoration: underline;
}

.notice-bar {
  background: #fdf2ed;
  padding: 10px;
  text-align: center;
  margin-bottom: 25px;
  border-radius: 4px;
}

.notice-bar a {
  color: #1b7ea5;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.notice-bar a:hover {
  text-decoration: underline;
}

.submit-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #FFFFFF;
  padding: 20px;
  border-top: 1px solid #f0f0f0;
  z-index: 100;
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
}

.submit-btn {
  width: 100%;
  max-width: 570px;
  padding: 15px;
  background-color: #1b7ea5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.submit-btn:hover {
  background-color: #bf4d13;
  box-shadow: 0 4px 15px rgba(237, 108, 45, 0.4);
}

.submit-btn:active {
  transform: scale(0.98);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Side Banner Styles */
.sidebar-left {
  width: 300px;
  position: fixed;
  right: calc(50% + 365px);
  top: 40px;
  z-index: 1;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  border: none;
  animation: fadeIn 0.8s ease-out;
}

.sidebar-left .sidebar-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Sidebar Popup Trigger */
.sidebar-trigger {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  background-color: #ED6C2D;
  color: white;
  border: none;
  padding: 15px 8px;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  box-shadow: 2px 0 15px rgba(237, 108, 45, 0.3);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background-color 0.3s, padding-left 0.3s;
}

.sidebar-trigger span {
  display: block;
}

.sidebar-trigger:hover {
  background-color: #bf4d13;
  padding-left: 12px;
}

/* Modal Styles */
.sidebar-modal-content {
  background: transparent;
  border: none;
  border-radius: 12px;
  overflow: visible;
}

.sidebar-modal-img {
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  max-width: 100%;
}

@media (max-width: 1366px) and (orientation: landscape) {
  #sidebarModal .modal-dialog {
    max-width: 90vw;
    margin: 1.75rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .sidebar-modal-content {
    width: auto;
    max-width: 100%;
  }
  
  .sidebar-modal-img {
    height: auto;
    max-height: 85vh;
    width: auto;
    max-width: 100%;
  }
}

.sidebar-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.9);
  opacity: 1;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.sidebar-modal-close:hover {
  transform: scale(1.1);
  background-color: #ffffff;
}

/* Media query to hide sidebar when it would overlap or go offscreen */
@media (max-width: 1350px) {
  .sidebar-left {
    display: none;
  }
}

@media (max-width: 1350px) {
  .sidebar-trigger {
    display: block;
  }
}

@media (max-width: 600px) {
  .main-wrapper {
    padding: 0px 0px 100px;
    align-items: flex-start;
  }

  .header-banner {
    margin-bottom: 0px;
  }

  .form-container {
    max-width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .form-body {
    padding: 20px 25px;
  }

  /* Smaller Sidebar Modal for Mobile */
  #sidebarModal .modal-dialog {
    max-width: 85%;
    margin: 1.75rem auto;
  }

  .sidebar-modal-close {
    top: 10px;
    right: 10px;
    padding: 10px;
  }
}

/* Driver Banner Overlay Styles */
.banner-overlay-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.banner-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.5% 3%;
  display: flex;
  flex-direction: column;
  color: white;
  pointer-events: none;
  z-index: 10;
}

.market-drivers-title {
  font-size: clamp(1rem, 1.8vw, 1.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5%;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  letter-spacing: -0.2px;
  color: #ffffff;
}

.drivers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  flex-grow: 1;
  gap: 0;
}

.driver-cell {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.driver-label-bar {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 5px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
}

.driver-name {
  font-size: clamp(0.5rem, 0.75vw, 0.65rem);
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile specific overrides for the banner overlay */
@media (max-width: 600px) {
  .banner-overlay-container {
    padding: 2% 1%;
  }

  .driver-label-bar {
    padding: 4px 6px;
  }
}

table th {
  text-align: center;
}