/* Cookie Consent Modal Styles */
.consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.consent-modal-open {
  overflow: hidden !important;
}

.consent-card {
  background: #ffffff;
  border-radius: 12px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1000000;
}

.consent-card .card-body {
  padding: 30px;
}

.consent-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.shield-icon {
  width: 50px;
  height: 50px;
  background: #004b8d;
  /* background: linear-gradient(135deg, #004b8d 0%, #0066cc 100%); */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 24px;
  flex-shrink: 0;
}

.header-title h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}

.language-selector {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 10;
}

.language-icon {
  font-size: 20px;
  color: #004b8d;
}

.language-selector select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}

/* Fix gTranslate dropdown positioning within consent modal */
.consent-header .language-selector .gt_selector,
.consent-header .language-selector .gt_selector ul,
.consent-header .language-selector .gt_selector .gt_languages {
  position: relative !important;
  z-index: 5;
}

.consent-header .language-selector .gt_selector ul {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
  min-width: 150px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000001 !important;
}

.consent-header .language-selector .gt_selector ul li {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.consent-header .language-selector .gt_selector ul li:last-child {
  border-bottom: none;
}

.consent-header .language-selector .gt_selector ul li:hover {
  background: #f5f5f5;
}

/* Force gTranslate dropdown to stay within modal bounds */
.consent-header {
  overflow: visible;
  position: relative;
}

/* Hide any gTranslate dropdowns that might be positioned fixed */
.consent-overlay .gt_selector .gt_languages,
.consent-overlay .gt_selector ul[style*="position: fixed"] {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
}

.header-content {
  margin-bottom: 20px;
}

.header-content p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.privacy-link {
  color: #004b8d;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.privacy-link:hover {
  text-decoration: underline;
}

.privacy-link-icon {
  font-size: 14px;
}

.consent-small-text {
  font-size: 12px;
  color: #888;
}

.consent-age-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #333;
  margin-bottom: 15px;
}

.consent-age-line b {
  color: #004b8d;
}

.underage-link {
  background: none;
  border: none;
  color: #004b8d;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.underage-link:hover {
  color: #003366;
}

.consent-action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.customize-toggle {
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.customize-toggle:hover {
  background: #e8e8e8;
}

.customize-icon {
  transition: transform 0.3s ease;
  font-size: 16px;
}

.customize-icon.open {
  transform: rotate(180deg);
}

.reject-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.reject-btn:hover {
  background: #e8e8e8;
}

.accept-btn {
  background: #004b8d;
  /* background: linear-gradient(135deg, #004b8d 0%, #0066cc 100%); */
  border: none;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.accept-btn:hover {
  background: #003366;
  /* background: linear-gradient(135deg, #003366 0%, #004b8d 100%); */
  /* transform: translateY(-1px); */
  box-shadow: 0 4px 12px rgba(0, 75, 141, 0.3);
}

.customize-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.customize-content.open {
  max-height: 1000px;
  overflow-y: auto;
}

.preference-item {
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.preference-item:last-child {
  border-bottom: none;
}

.preference-item h5 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.always-active-text {
  font-size: 12px;
  color: #004b8d;
  font-weight: 500;
  background: rgba(0, 75, 141, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.preference-item p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 5px;
}

.legal-basis {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

.consent-toggle {
  transform: scale(1.2);
}

.consent-toggle .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #004b8d;
  border-color: #004b8d;
}

/* Under 18 Modal */
.consent-overlay.align-items-center {
  align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
  .consent-card {
    max-width: 100%;
    margin: 10px;
  }

  .consent-card .card-body {
    padding: 20px;
  }

  .consent-header {
    flex-direction: column;
  }

  .language-selector {
    margin-left: 0;
    margin-top: 10px;
  }

  .consent-action-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .customize-toggle,
  .reject-btn,
  .accept-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .consent-age-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .customize-toggle {
    order: 2;
  }

  .consent-action-buttons {
    order: 1;
  }
}

/* Back button for under-18 modal */
.consent-back-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 15px;
}

.consent-back-btn:hover {
  background: #e8e8e8;
}

.consent-back-btn svg {
  width: 16px;
  height: 16px;
}
.language-selector .gt_switcher .gt_selected a:after{
  right: 0px !important;
}
.language-selector .gt_selected a {
width: max-content !important;
}