/* =========================================================
   KDC 2026 - MULTI-LAYERED ANTI-BOT HUMAN CHALLENGE
   Theme: Light Luxury Theme matching dermacouncilconferencekw
   Ivory / White card, Navy (#0d355f) and Gold (#ba9a62)
========================================================= */

.kdc-challenge-wrap {
  position: relative;
  margin: 1.25rem 0 1.75rem 0;
  border-radius: 20px;
  background: radial-gradient(circle at 94% 10%, rgba(186, 154, 98, 0.12), transparent 38%),
              linear-gradient(135deg, #ffffff 0%, #fbf9f5 100%);
  border: 1.5px solid rgba(186, 154, 98, 0.32);
  box-shadow: 0 12px 35px rgba(13, 53, 95, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
  padding: 24px 28px;
  color: #1d3246;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.kdc-challenge-wrap:hover {
  border-color: rgba(186, 154, 98, 0.55);
  box-shadow: 0 16px 42px rgba(13, 53, 95, 0.10);
}

/* Subtle decorative pattern overlay */
.kdc-challenge-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(13, 53, 95, 0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(13, 53, 95, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.8;
}

.kdc-challenge-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.kdc-challenge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d355f 0%, #174a7e 100%);
  color: #d8c49d;
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(13, 53, 95, 0.16);
  flex-shrink: 0;
}

.kdc-challenge-meta {
  flex: 1;
}

.kdc-challenge-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #ba9a62;
  margin-bottom: 3px;
}

.kdc-challenge-eyebrow span.kdc-secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(186, 154, 98, 0.14);
  border: 1px solid rgba(186, 154, 98, 0.35);
  color: #8c6c2f;
}

.kdc-challenge-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  line-height: 1.4;
}

/* Interactive Challenge Action Area */
.kdc-challenge-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(13, 53, 95, 0.10);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: inset 0 1px 3px rgba(13, 53, 95, 0.02);
}

/* Equation Display Card */
.kdc-challenge-eq-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 2px solid rgba(186, 154, 98, 0.42);
  border-radius: 12px;
  padding: 10px 20px;
  box-shadow: 0 4px 12px rgba(13, 53, 95, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.kdc-challenge-math {
  font-family: "Outfit", "Inter", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #0d355f;
  user-select: none;
  -webkit-user-select: none;
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.kdc-challenge-math.updating {
  opacity: 0;
  transform: scale(0.9);
}

/* Refresh Button */
.kdc-challenge-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid rgba(13, 53, 95, 0.18);
  color: #0d355f;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(13, 53, 95, 0.04);
}

.kdc-challenge-refresh-btn:hover {
  background: #0d355f;
  border-color: #0d355f;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 53, 95, 0.16);
}

.kdc-challenge-refresh-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(186, 154, 98, 0.35);
}

.kdc-challenge-refresh-btn i {
  font-size: 15px;
  transition: transform 0.5s ease;
  color: #ba9a62;
}

.kdc-challenge-refresh-btn:hover i {
  color: #ffffff;
}

.kdc-challenge-refresh-btn.spinning i {
  animation: kdcSpin 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes kdcSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Equals Sign */
.kdc-challenge-equals {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ba9a62;
  user-select: none;
}

/* Answer Input Field */
.kdc-challenge-input-box {
  display: inline-flex;
  align-items: center;
  position: relative;
  flex: 0 0 150px;
}

.kdc-challenge-input {
  width: 100%;
  height: 50px;
  background: #ffffff !important;
  color: #0d355f !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  text-align: center;
  border: 2px solid rgba(186, 154, 98, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 6px rgba(13, 53, 95, 0.04) !important;
  padding: 6px 12px !important;
  transition: all 0.2s ease !important;
}

.kdc-challenge-input:focus {
  border-color: #ba9a62 !important;
  box-shadow: 0 0 0 4px rgba(186, 154, 98, 0.25) !important;
  outline: none !important;
}

.kdc-challenge-input.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.20) !important;
}

.kdc-challenge-input.is-valid {
  border-color: #198754 !important;
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.20) !important;
}

.kdc-challenge-input::placeholder {
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Helper note */
.kdc-challenge-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kdc-challenge-note i {
  color: #ba9a62;
  font-size: 14px;
}

/* Dynamic Feedback Message */
.kdc-challenge-feedback {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  display: none;
  animation: kdcFadeIn 0.3s ease;
}

@keyframes kdcFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.kdc-challenge-feedback.error {
  color: #dc3545;
}

.kdc-challenge-feedback.success {
  color: #198754;
}

@keyframes kdcShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.kdc-shake {
  animation: kdcShake 0.5s ease-in-out !important;
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2) !important;
}

/* Honeypot container: completely invisible & un-tabbable by humans */
.kdc-anti-bot-trap {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -999 !important;
  overflow: hidden !important;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
  .kdc-challenge-wrap {
    padding: 18px 18px;
  }
  .kdc-challenge-body {
    padding: 14px;
    gap: 10px;
  }
  .kdc-challenge-input-box {
    flex: 1 0 100%;
  }
  .kdc-challenge-input {
    height: 46px;
    font-size: 1.2rem !important;
  }
  .kdc-challenge-equals {
    display: none;
  }
}
