/* ==========================================================================
   DP World ILT20 - Cookie Notice & Third-Party Style Settings Styles
   Matches exact reference form UI at bottom-left
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Bottom-Left Cookie Consent Form Card (Reference Image Exact Match)
   -------------------------------------------------------------------------- */
.ilt20-cookie-card {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 380px;
  max-width: calc(100% - 48px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.12);
  padding: 18px 20px 20px 20px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2b2b2b;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease,
    visibility 0.35s ease;
  pointer-events: none;
  box-sizing: border-box;
}

.ilt20-cookie-card.ilt20-cookie-card-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Pink Magenta Close Button in Top-Right */
.ilt20-cookie-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 24px;
  height: 24px;
  background: #e6007e;
  border-radius: 5px;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.15s ease;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(230, 0, 126, 0.35);
}

.ilt20-cookie-close-btn:hover {
  background: #c7006d;
  transform: scale(1.05);
}

.ilt20-cookie-close-btn:active {
  transform: scale(0.95);
}

/* Cookie Notice Paragraph */
.ilt20-cookie-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-bg-purple);
  margin: 0 0 16px 0;
  padding-right: 22px;
  font-weight: 400;
  box-sizing: border-box;
  font-family: var(--font-heading);
}

.ilt20-cookie-policy-link {
  color: #111111;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.ilt20-cookie-policy-link:hover {
  text-decoration: underline;
  color: #e6007e;
}

/* Vertically Stacked Action Buttons */
.ilt20-cookie-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.ilt20-cookie-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  box-sizing: border-box;
  text-decoration: none;
  line-height: 1.2;
  font-family: var(--font-body);
}

/* Solid Dark Purple Buttons (Accept All & Reject All) */
.ilt20-cookie-btn-primary {
  background: var(--color-bg-card);
  color: #ffffff;
  border: 1.5px solid var(--color-bg-card);
}

.ilt20-cookie-btn-primary:hover {
  background: #39055e;
  border-color: #39055e;
}

.ilt20-cookie-btn-primary:active {
  transform: scale(0.98);
}

/* Outlined White Button (Cookies Settings) */
.ilt20-cookie-btn-outline {
  background: #ffffff;
  color: #25023d;
  border: 1.5px solid #25023d;
}

.ilt20-cookie-btn-outline:hover {
  background: #f7f1fa;
}

.ilt20-cookie-btn-outline:active {
  transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   2. Third-Party Style Cookie Settings Modal (Privacy Preference Center)
   -------------------------------------------------------------------------- */
.ilt20-cookie-settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 2, 25, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-sizing: border-box;
}

.ilt20-cookie-settings-backdrop.ilt20-settings-visible {
  opacity: 1;
  visibility: visible;
}

.ilt20-cookie-settings-dialog {
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transform: scale(0.94) translateY(18px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.ilt20-cookie-settings-backdrop.ilt20-settings-visible .ilt20-cookie-settings-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.ilt20-settings-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fdfdfd;
}

.ilt20-settings-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #25023d;
  letter-spacing: -0.3px;
}

.ilt20-settings-close {
  background: transparent;
  border: none;
  color: #6b7280;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.ilt20-settings-close:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Modal Body */
.ilt20-settings-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
}

.ilt20-settings-intro {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #4b5563;
  margin: 0 0 20px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f2f5;
}

/* Category Items */
.ilt20-settings-category-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ilt20-settings-category {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ilt20-settings-category:hover {
  background: #fdfdfd;
  border-color: #d1d5db;
}

.ilt20-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.ilt20-category-label {
  font-size: 0.95rem;
  color: #1f2937;
}

.ilt20-category-desc {
  font-size: 0.84rem;
  line-height: 1.48;
  color: #6b7280;
  margin: 0;
}

/* Always Active Badge */
.ilt20-badge-always-active {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #25023d;
  background: rgba(37, 2, 61, 0.08);
  border: 1px solid rgba(37, 2, 61, 0.25);
  padding: 3px 10px;
  border-radius: 9999px;
}

/* Third-Party Style Toggle Switches */
.ilt20-tp-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.ilt20-tp-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ilt20-tp-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db;
  transition: all 0.25s ease;
  border-radius: 9999px;
}

.ilt20-tp-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.ilt20-tp-toggle input:checked+.ilt20-tp-slider {
  background-color: #25023d;
}

.ilt20-tp-toggle input:checked+.ilt20-tp-slider::before {
  transform: translateX(20px);
}

/* Modal Footer */
.ilt20-settings-footer {
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ilt20-settings-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  outline: none;
}

.ilt20-settings-btn-primary {
  background: #25023d;
  color: #ffffff;
}

.ilt20-settings-btn-primary:hover {
  background: #39055e;
}

.ilt20-settings-btn-outline {
  background: #ffffff;
  border-color: #25023d;
  color: #25023d;
}

.ilt20-settings-btn-outline:hover {
  background: #f4edf8;
}

.ilt20-settings-btn-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #4b5563;
}

.ilt20-settings-btn-secondary:hover {
  background: #f3f4f6;
  color: #111827;
}

/* --------------------------------------------------------------------------
   3. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .ilt20-cookie-card {
    /* Position comfortably above mobile bottom navigation bar */
    bottom: 74px;
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    padding: 16px 16px 18px 16px;
    border-radius: 12px;
  }

  .ilt20-cookie-settings-dialog {
    max-height: 90vh;
    border-radius: 12px;
  }

  .ilt20-settings-header {
    padding: 14px 18px;
  }

  .ilt20-settings-body {
    padding: 16px 18px;
  }

  .ilt20-settings-footer {
    padding: 12px 18px;
    flex-direction: column-reverse;
  }

  .ilt20-settings-btn {
    width: 100%;
    text-align: center;
  }
}