/* ========================================================= */
/* KIDMATIC CHECKOUT OTP AUTH STYLESHEET */
/* ========================================================= */

.kidmatic-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(26, 37, 65, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: kidmaticFadeIn 0.3s ease;
}

.kidmatic-premium-modal {
  background-color: #FFFFFF;
  border-radius: 20px;
  padding: 36px 32px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(26, 37, 65, 0.15);
  border: 1px solid #E8ECF2;
  position: relative;
  animation: kidmaticScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #1A2541;
  text-align: center;
}

.kidmatic-modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: #5E6A82;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.kidmatic-modal-close-btn:hover {
  background-color: #F8F9FB;
  color: #1A2541;
}

.kidmatic-modal-logo-icon {
  width: 52px;
  height: 52px;
  background-color: rgba(1, 161, 23, 0.08);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
}

.kidmatic-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #1A2541;
  margin-bottom: 10px;
  letter-spacing: -0.019em;
  line-height: 1.25;
}

.kidmatic-modal-subtitle {
  font-size: 14px;
  color: #5E6A82;
  margin-bottom: 28px;
  line-height: 1.5;
}

.kidmatic-align-left {
  text-align: left;
}

.kidmatic-modal-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5E6A82;
  margin-bottom: 8px;
  font-weight: 700;
  display: block;
}

/* Phone Input Fields */
.kidmatic-phone-input-container {
  display: flex;
  border: 1px solid #E8ECF2;
  border-radius: 12px;
  background-color: #FFFFFF;
  overflow: hidden;
  transition: all 0.2s ease;
  width: 100%;
}

.kidmatic-phone-input-container:focus-within {
  border-color: #01A117;
  box-shadow: 0 0 0 4px rgba(1, 161, 23, 0.08);
}

.kidmatic-country-code-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background-color: #F8F9FB;
  border-right: 1px solid #E8ECF2;
  font-size: 14px;
  font-weight: 600;
  color: #1A2541;
  user-select: none;
}

.kidmatic-flag-img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.kidmatic-phone-field {
  flex-grow: 1;
  border: none !important;
  box-shadow: none !important;
  padding: 14px 16px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  outline: none !important;
  color: #1A2541 !important;
  background: transparent !important;
}

.kidmatic-modal-footer-link {
  font-size: 13px;
  color: #5E6A82;
  margin-top: 24px;
}

.kidmatic-green-link {
  color: #01A117;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.kidmatic-green-link:hover {
  color: #008812;
  text-decoration: underline;
}

/* ========================================================= */
/* BUTTON LAYOUTS */
/* ========================================================= */
.kidmatic-btn {
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.kidmatic-btn-primary {
  background-color: #01A117;
  color: #FFFFFF;
  padding: 16px 24px;
  box-shadow: 0 4px 12px rgba(1, 161, 23, 0.15);
}

.kidmatic-btn-primary:hover {
  background-color: #008812;
  box-shadow: 0 6px 18px rgba(1, 161, 23, 0.25);
}

.kidmatic-btn-with-loader {
  position: relative;
}

.kidmatic-btn-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: kidmaticSpin 0.8s linear infinite;
  display: inline-block;
}

/* ========================================================= */
/* STEP 2: OTP VERIFICATION BOXES */
/* ========================================================= */
.kidmatic-shield-badge-holder {
  margin-bottom: 24px;
}

.kidmatic-shield-icon-bg {
  width: 68px;
  height: 68px;
  background-color: rgba(1, 161, 23, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.kidmatic-otp-boxes-wrapper {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

.kidmatic-otp-box {
  width: 56px;
  height: 56px;
  border: 2px solid #E8ECF2;
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1A2541;
  outline: none;
  transition: all 0.2s ease;
  background-color: #FFFFFF;
}

.kidmatic-otp-box:focus {
  border-color: #01A117;
  box-shadow: 0 0 0 4px rgba(1, 161, 23, 0.08);
}

.kidmatic-otp-timer-row {
  font-size: 13px;
  color: #5E6A82;
  margin-bottom: 28px;
}

.kidmatic-timer-countdown {
  color: #01A117;
  font-weight: 600;
}

/* ========================================================= */
/* STEP 3: BACKGROUND CHECKLIST LOADER */
/* ========================================================= */
.kidmatic-loader-circle-wrapper {
  margin: 24px auto;
  position: relative;
  width: 68px;
  height: 68px;
}

.kidmatic-loading-ring-animation {
  width: 68px;
  height: 68px;
  border: 4px solid #E8ECF2;
  border-radius: 50%;
  border-top-color: #01A117;
  animation: kidmaticSpin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.kidmatic-verification-checklist {
  list-style: none;
  text-align: left;
  max-width: 280px;
  margin: 28px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

.kidmatic-checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.kidmatic-checklist-item.pending {
  color: #5E6A82;
  opacity: 0.5;
}

.kidmatic-checklist-item.done {
  color: #1A2541;
  opacity: 1;
}

.kidmatic-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.kidmatic-checklist-item.pending .kidmatic-check-icon {
  background-color: #E8ECF2;
  color: transparent;
}

.kidmatic-checklist-item.done .kidmatic-check-icon {
  background-color: #16A34A;
  color: #FFFFFF;
}

/* ========================================================= */
/* STEP 4: SUCCESS */
/* ========================================================= */
.kidmatic-success-icon-badge {
  width: 76px;
  height: 76px;
  background-color: #16A34A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.25);
  animation: kidmaticPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mt-4 {
  margin-top: 16px;
}

/* ========================================================= */
/* GUEST ACCOUNT DASHBOARD (MY ACCOUNT) */
/* ========================================================= */
.kidmatic-dashboard-wrapper {
  background-color: #F8F9FB;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #E8ECF2;
  margin-bottom: 32px;
  color: #1A2541;
  text-align: left;
}

.kidmatic-guest-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.kidmatic-guest-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #10B981;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kidmatic-guest-banner h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #FFFFFF;
}

.kidmatic-guest-banner p {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 600px;
}

.kidmatic-progress-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kidmatic-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #E2E8F0;
}

.kidmatic-progress-text .kidmatic-percentage {
  color: #34D399;
}

.kidmatic-progress-bar-bg {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.kidmatic-progress-bar-fill {
  height: 100%;
  background-color: #10B981;
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* Card Widget Styles */
.kidmatic-profile-card {
  background-color: #FFFFFF;
  padding: 32px;
}

.kidmatic-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  border-bottom: 1px solid #E8ECF2;
  padding-bottom: 12px;
  color: #1A2541;
}

.kidmatic-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.kidmatic-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kidmatic-form-group.kidmatic-half {
  grid-column: span 1;
}

/* Form Grid responsive layout */
@media (max-width: 768px) {
  .kidmatic-form-grid {
    grid-template-columns: 1fr;
  }
}

.kidmatic-profile-card label {
  font-size: 13px;
  font-weight: 600;
  color: #1A2541;
}

.kidmatic-profile-card input[type="text"],
.kidmatic-profile-card input[type="email"],
.kidmatic-profile-card textarea {
  background-color: #FFFFFF;
  border: 1px solid #E8ECF2;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: #1A2541;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.kidmatic-profile-card input:focus,
.kidmatic-profile-card textarea:focus {
  border-color: #01A117;
  box-shadow: 0 0 0 3px rgba(1, 161, 23, 0.08);
}

.kidmatic-input-with-badge {
  position: relative;
  display: flex;
  align-items: center;
}

.kidmatic-readonly-input {
  background-color: #F8F9FB !important;
  color: #5E6A82 !important;
  cursor: not-allowed;
  padding-right: 90px !important;
}

.kidmatic-verified-badge {
  position: absolute;
  right: 12px;
  background-color: rgba(22, 163, 74, 0.1);
  color: #16A34A;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kidmatic-helper-text {
  font-size: 12px;
  color: #5E6A82;
  margin-top: 4px;
}

.kidmatic-form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1A2541;
  margin-top: 32px;
  margin-bottom: 16px;
  border-bottom: 1px solid #E8ECF2;
  padding-bottom: 8px;
}

.kidmatic-save-changes-btn {
  background-color: #01A117;
  color: #FFFFFF;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.kidmatic-save-changes-btn:hover {
  background-color: #008812;
}

/* ========================================================= */
/* KEYFRAMES & ANIMATIONS */
/* ========================================================= */
@keyframes kidmaticFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes kidmaticScaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes kidmaticPopIn {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

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

@keyframes kidmaticSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ========================================================= */
/* RESPONSIVE BOTTOM SHEET OVERRIDES (MOBILE VIEWPORT) */
/* ========================================================= */
@media (max-width: 480px) {
  .kidmatic-modal-backdrop {
    align-items: flex-end;
  }

  .kidmatic-premium-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    animation: kidmaticSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 28px 20px 48px 20px;
  }

  /* Bottom sheet notch handle */
  .kidmatic-premium-modal::before {
    content: '';
    width: 44px;
    height: 4px;
    background-color: #E8ECF2;
    border-radius: 99px;
    display: block;
    margin: -16px auto 24px auto;
  }
}
