/* kyc-security.css */
.kyc-sec-box {
    max-width: 450px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    animation: kycFadeIn 0.3s ease-out;
}

@keyframes kycFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.kyc-sec-header {
    text-align: center;
    margin-bottom: 25px;
}

.kyc-sec-icon {
    width: 60px;
    height: 60px;
    color: #f59e0b;
    background: #fef3c7;
    padding: 14px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.kyc-sec-header h3 { margin: 0 0 10px; font-size: 22px; color: #111827; }
.kyc-sec-header p { margin: 0; color: #6b7280; font-size: 15px; }

.kyc-sec-body { margin-bottom: 25px; }
.kyc-sec-q-text {
    background: #f3f4f6; padding: 15px; border-radius: 8px; font-size: 15px;
    color: #374151; margin-bottom: 15px; border-left: 4px solid #4f46e5;
}

.kyc-sec-box input[type="text"], .kyc-sec-box input[type="password"] {
    width: 100%; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 16px; transition: all 0.2s; box-sizing: border-box;
}

.kyc-sec-box input:focus {
    outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.kyc-sec-btn {
    width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 16px;
    font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.kyc-sec-btn-prime { background: #4f46e5; color: white; }
.kyc-sec-btn-prime:hover { background: #4338ca; }
.kyc-sec-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.loader {
    display: none; margin-left: 8px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%; width: 16px; height: 16px;
    animation: kycSpin 1s linear infinite;
}
@keyframes kycSpin { 100% { transform: rotate(360deg); } }

.woocommerce-form-security-setup { background: #f9fafb; padding: 30px; border-radius: 8px; border: 1px solid #e5e7eb; }
.kyc-sec-notice-success { background:#ecfdf5; border:1px solid #10b981; padding:20px; border-radius:8px; color:#065f46; }

/* PIN Pad Styling */
.kyc-pin-dots-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0 30px;
}

.kyc-pin-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.2s;
}

.kyc-pin-dot.filled {
    background: #4f46e5;
    transform: scale(1.2);
}

.kyc-pin-dot.error {
    background: #ef4444;
}

.kyc-pin-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 20px;
}

.kyc-pin-numpad button {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 24px;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    transition: background 0.1s;
}

.kyc-pin-numpad button:hover { background: #e5e7eb; }
.kyc-pin-numpad button:active { background: #d1d5db; transform: scale(0.95); }

.kyc-num-action { font-size: 16px !important; color: #4f46e5 !important; font-weight: 600 !important; }

/* Checkout overlay specificity */
#kyc-checkout-pin-mask .kyc-sec-box {
    transform: translateY(-50px);
    animation: slideDownFade 0.3s forwards;
}

@keyframes slideDownFade {
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}
.pin-shake { animation: shakeError 0.4s; }

/* ================================================================
   SECURITY SETUP - Premium UI
   ================================================================ */
.kyc-sec-setup-wrapper {
  max-width: 600px;
  margin: 0 auto;
  animation: kycFadeIn 0.4s ease-out;
}

.kyc-sec-setup-header {
  text-align: center;
  margin-bottom: 32px;
}

.kyc-sec-setup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
}

.kyc-sec-setup-icon svg {
  width: 100%;
  height: 100%;
  stroke: #4f46e5;
}

.kyc-sec-setup-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

.kyc-sec-setup-desc {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* Card */
.kyc-sec-card {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.kyc-sec-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

/* Badge */
.kyc-sec-card-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.kyc-sec-badge-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kyc-sec-badge-label {
  font-weight: 600;
  font-size: 16px;
  color: #1e293b;
}

.kyc-sec-card-desc {
  font-size: 13px;
  color: #9ca3af;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Fields */
.kyc-sec-field {
  margin-bottom: 16px;
}

.kyc-sec-field:last-child {
  margin-bottom: 0;
}

.kyc-sec-field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
}

.kyc-sec-field label .req {
  color: #ef4444;
}

.kyc-sec-field input[type="text"],
.kyc-sec-field input[type="password"],
.kyc-sec-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.kyc-sec-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5l6.5 6 6.5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 32px;
  cursor: pointer;
}

.kyc-sec-field input:focus,
.kyc-sec-field select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: #fff;
}

/* PIN Digit Boxes */
.kyc-pin-digits {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.kyc-pin-digit {
  width: 48px !important;
  height: 56px;
  border: 2px solid #d1d5db !important;
  border-radius: 12px !important;
  text-align: center;
  font-size: 22px !important;
  font-weight: 700;
  color: #1e293b !important;
  background: #f9fafb !important;
  caret-color: #6366f1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  padding: 0 !important;
  box-sizing: border-box;
}

.kyc-pin-digit:focus {
  outline: none;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #fff !important;
  transform: translateY(-2px);
}

.kyc-pin-sep {
  font-size: 18px;
  color: #d1d5db;
  font-weight: 300;
  padding: 0 2px;
  user-select: none;
}

.kyc-pin-match-msg {
  font-size: 13px;
  font-weight: 600;
  margin: 10px 0 0;
  display: none;
}

/* Submit Button */
.kyc-sec-submit-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  transition: all 0.25s ease;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.kyc-sec-submit-btn svg {
  width: 18px;
  height: 18px;
}

.kyc-sec-submit-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.kyc-sec-submit-btn:active {
  transform: translateY(0);
}

/* Success notice override */
.kyc-sec-notice-success {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
  border: 1.5px solid #6ee7b7 !important;
  padding: 24px !important;
  border-radius: 14px !important;
  color: #065f46 !important;
  max-width: 600px;
  margin: 0 auto;
}

.kyc-sec-notice-success h3 {
  color: #065f46;
  margin: 0 0 8px;
}

.kyc-sec-notice-success p {
  margin: 0;
  color: #047857;
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 520px) {
  .kyc-sec-card {
    padding: 20px;
  }

  .kyc-pin-digit {
    width: 42px !important;
    height: 50px;
    font-size: 18px !important;
  }

  .kyc-pin-digits {
    gap: 5px;
  }

  .kyc-sec-setup-title {
    font-size: 19px;
  }
}
