/**
 * Quick Add to Cart — variation picker popup.
 * Uses the theme design tokens so it matches cards / cart drawer.
 */

.iccon-qa-overlay {
  position: fixed;
  inset: 0;
  z-index: 50; /* above content, at/under the cart drawer which opens after */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.iccon-qa-overlay[hidden] { display: none; }

.iccon-qa-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 48, 0.55);
  backdrop-filter: blur(2px);
  animation: iccon-qa-fade 0.18s ease-out;
}

.iccon-qa-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 42, 71, 0.28);
  padding: 26px 24px 24px;
  animation: iccon-qa-pop 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.iccon-qa-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6B7280;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.iccon-qa-close:hover { background: #F1F4F8; color: #0F2A47; }
.iccon-qa-close:focus-visible { outline: 2px solid var(--iccon-teal, #0EA5E9); outline-offset: 2px; }

.iccon-qa-title {
  margin: 0 34px 18px 0;
  font-family: 'Roboto', 'Roboto Fallback', 'Inter', system-ui, sans-serif; /* match the live site (icconinternational.com) */
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0F2A47;
}

.iccon-qa-body { min-height: 92px; }

.iccon-qa-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
}
/* display:flex above overrides the [hidden] attribute, so restore it explicitly. */
.iccon-qa-loading[hidden],
.iccon-qa-fields[hidden] { display: none !important; }
.iccon-qa-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid #E4E9EF;
  border-top-color: var(--iccon-teal, #0EA5E9);
  animation: iccon-qa-spin 0.7s linear infinite;
}

.iccon-qa-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7280;
  margin: 0 0 8px;
}

.iccon-qa-select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1px solid #D9DFE7;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #0F2A47;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.iccon-qa-select:focus {
  outline: none;
  border-color: var(--iccon-teal, #0EA5E9);
  box-shadow: 0 0 0 3px var(--iccon-teal-soft, rgba(14, 165, 233, 0.15));
}

.iccon-qa-msg {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: #C0392B;
}

.iccon-qa-add {
  width: 100%;
  margin-top: 16px;
  padding: 13px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--iccon-teal, #0EA5E9);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.iccon-qa-add:hover:not(:disabled) { background: var(--iccon-teal-hover, #0C90CE); }
.iccon-qa-add:disabled { opacity: 0.5; cursor: not-allowed; }
.iccon-qa-add:focus-visible { outline: 2px solid #0F2A47; outline-offset: 2px; }

body.iccon-qa-open { overflow: hidden; }

@keyframes iccon-qa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes iccon-qa-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes iccon-qa-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .iccon-qa-backdrop, .iccon-qa-modal { animation: none; }
  .iccon-qa-spinner { animation-duration: 1.2s; }
}

@media (max-width: 480px) {
  .iccon-qa-overlay { padding: 0; align-items: flex-end; }
  .iccon-qa-modal {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    padding-bottom: 28px;
    animation: iccon-qa-slideup 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
  }
}
@keyframes iccon-qa-slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
