/* Full screen gate styles */
:root {
  --il-dark-blue: #123B7A;
  --il-bright-blue: #2F78BD;
  --il-gold: #D1A343;
  --il-pale-blue: #EAF6FC;
  --il-white: #FFFFFF;
  --il-charcoal: #293A45;
  --il-overlay-color: rgba(18, 59, 122, 0.85);
}

/* Prevent scrolling when gate is active */
html.il-gate-active,
html.il-gate-active body {
  overflow: hidden !important;
  height: 100vh !important;
}

.il-gate-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--il-overlay-color);
  z-index: 99999999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
}

/* Handle WordPress Admin Bar offset */
body.admin-bar .il-gate-overlay {
  top: var(--wp-admin--admin-bar--height, 32px);
  height: calc(100% - var(--wp-admin--admin-bar--height, 32px));
}
@media screen and (max-width: 782px) {
  body.admin-bar .il-gate-overlay {
    top: 46px;
    height: calc(100% - 46px);
  }
}

/* Display overlay when active class is present */
html.il-gate-active .il-gate-overlay {
  display: flex;
}

/* Modal Content Card */
.il-gate-modal {
  background: var(--il-white);
  color: var(--il-charcoal);
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-height: 90vh;
  overflow-y: auto;
  line-height: 1.6;
}

.il-gate-heading {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--il-dark-blue);
  font-size: 28px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.2;
}

.il-gate-intro {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
}

.il-gate-warning-box {
  background-color: var(--il-pale-blue);
  border-left: 4px solid var(--il-gold);
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.il-gate-warning-text {
  color: var(--il-dark-blue);
  font-weight: 600;
  margin: 0;
  font-size: 15px;
}

.il-gate-supporting {
  font-size: 14px;
  color: #5d6e7b;
  margin-bottom: 24px;
}

.il-gate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.il-gate-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.il-gate-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--il-bright-blue);
  border-radius: 4px;
  background-color: var(--il-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.il-gate-checkbox:checked {
  background-color: var(--il-bright-blue);
  border-color: var(--il-bright-blue);
}

.il-gate-checkbox:checked::after {
  content: "";
  display: block;
  width: 5px;
  height: 10px;
  border: solid var(--il-white);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 2px;
  left: 6px;
}

.il-gate-checkbox:focus-visible {
  outline: 2px solid var(--il-gold);
  outline-offset: 2px;
}

.il-gate-checkbox-text {
  color: var(--il-charcoal);
  font-weight: 500;
  line-height: 1.4;
}

.il-gate-policy-text {
  font-size: 12px;
  color: #7f919d;
  margin-top: 8px;
  margin-bottom: 24px;
}

.il-gate-policy-text a {
  color: var(--il-bright-blue);
  text-decoration: underline;
  font-weight: 500;
}

.il-gate-policy-text a:hover {
  color: var(--il-dark-blue);
}

.il-gate-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.il-gate-btn-primary {
  width: 100%;
  background-color: var(--il-dark-blue);
  color: var(--il-white);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: center;
}

.il-gate-btn-primary:hover:not(:disabled) {
  background-color: var(--il-bright-blue);
}

.il-gate-btn-primary:focus-visible {
  outline: 2px solid var(--il-gold);
  outline-offset: 2px;
}

.il-gate-btn-primary:disabled {
  background-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
}

.il-gate-link-secondary {
  color: var(--il-charcoal);
  text-decoration: underline;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.il-gate-link-secondary:hover {
  color: var(--il-dark-blue);
}

/* Cart Page Terms Checkbox CSS */
.il-cart-terms-container-c79d9758 {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f8fafc;
}

.il-cart-terms-label-c79d9758 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}

.il-cart-terms-label-c79d9758 input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
}

.il-cart-terms-text-c79d9758 a {
  color: var(--il-bright-blue);
  text-decoration: underline;
  font-weight: 600;
}

.il-cart-terms-error-c79d9758 {
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
}

/* Disabled styling for checkout button if terms not checked */
.checkout-button.il-disabled-btn-c79d9758 {
  opacity: 0.5 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Mobile responsive fixes */
@media (max-width: 480px) {
  .il-gate-modal {
    padding: 24px 20px;
  }
  .il-gate-heading {
    font-size: 22px;
  }
  .il-gate-intro {
    font-size: 14px;
  }
}
