/**
 * assets/css/wizard.css
 * Styles for the 16-Step Conversational Enquiry Wizard.
 */

:root {
  --wizard-primary: #0ea5e9;
  --wizard-secondary: #6366f1;
  --wizard-bg: rgba(255, 255, 255, 0.95);
  --wizard-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --wizard-glass: rgba(255, 255, 255, 0.8);
}

.korkoo-wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.korkoo-wizard-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.korkoo-wizard {
  background: rgba(255, 255, 255, 0.98);
  width: 95%;
  max-width: 500px;
  border-radius: 24px;
  position: relative;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.2),
    0 5px 15px rgba(0, 0, 0, 0.1);
  border: 4px solid rgba(99, 102, 241, 0.2); /* Thicker border for gamified feel */
  backdrop-filter: blur(20px);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.active .korkoo-wizard {
  transform: scale(1) translateY(0);
}

/* Header & Progress */
.wizard-header {
  padding: 12px 20px 4px;
  position: relative;
}

.wizard-progress-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wizard-primary), var(--wizard-secondary));
  width: 0%;
  transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.wizard-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.wizard-close:hover {
  background: #e2e8f0;
}

/* Content Area */
.wizard-body {
  flex: 1;
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
}

.wizard-step {
  display: none;
  animation: fadeInRight 0.4s ease-out;
}

.wizard-step.active {
  display: block;
}

/* Gamification Steps Palette */
.wizard-step:nth-child(4n+1) { --step-color: #0ea5e9; --step-shadow: 0 15px 35px rgba(14, 165, 233, 0.25); }
.wizard-step:nth-child(4n+2) { --step-color: #6366f1; --step-shadow: 0 15px 35px rgba(99, 102, 241, 0.25); }
.wizard-step:nth-child(4n+3) { --step-color: #f59e0b; --step-shadow: 0 15px 35px rgba(245, 158, 11, 0.25); }
.wizard-step:nth-child(4n+4) { --step-color: #10b981; --step-shadow: 0 15px 35px rgba(16, 185, 129, 0.25); }

.korkoo-wizard { 
  border-color: var(--step-color, #6366f1) !important; 
  box-shadow: var(--step-shadow) !important; 
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* UI Components */
.wizard-title {
  font-size: 1.15rem; /* Smoaler */
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.3;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.option-card {
  padding: 10px;
  border: 2px solid #f1f5f9;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.option-card:hover {
  border-color: var(--step-color, var(--wizard-primary));
  background: #f8fafc;
  transform: translateY(-2px);
}

.option-card.selected {
  border-color: var(--step-color, var(--wizard-primary));
  background: white;
  box-shadow: 0 0 0 1px var(--step-color, var(--wizard-primary));
}

.option-icon {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 14px;
  transition: all 0.4s ease;
}

.option-card:hover .option-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--step-color, var(--wizard-primary));
  color: white;
}

.option-label {
  font-weight: 700;
  color: #334155;
  font-size: 0.85rem;
}

/* Inputs */
.wizard-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #f1f5f9;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #f8fafc;
}

.wizard-input:focus {
  outline: none;
  border-color: var(--step-color, var(--wizard-primary));
  background: white;
}

/* Footer & Buttons */
.wizard-footer {
  padding: 12px 20px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e2e8f0;
}

.wizard-btn {
  padding: 7px 16px;
  border-radius: 99px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  font-size: 0.8rem;
}

.btn-back {
  background: transparent;
  color: #64748b;
}

.btn-next {
  background: var(--step-color, var(--wizard-primary));
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-next.btn-gamified {
  animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); filter: brightness(1.1); }
  100% { transform: scale(1); }
}

.btn-next:hover {
  transform: translateY(-1px) scale(1.02);
}

.btn-next:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

/* Success Sate */
.wizard-success {
  text-align: center;
  padding: 30px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .korkoo-wizard {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
  }
  .option-grid {
    grid-template-columns: 1fr;
  }
}
