/**
 * Advance Build Wizard Styles
 * Step-by-step premium build customization
 */

/* ========== Modal Overlay ========== */
.advance-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.98);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  box-sizing: border-box;
}

.advance-wizard-overlay.show {
  display: flex;
}

/* ========== Wizard Container ========== */
.advance-wizard {
  width: 100%;
  height: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding-top: calc(env(safe-area-inset-top, 20px) + 10px);
  padding-bottom: env(safe-area-inset-bottom, 20px);
  box-sizing: border-box;
  overflow: hidden;
}

/* ========== Header ========== */
.advance-wizard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.wizard-back-header-btn {
  background: rgba(30, 30, 30, 0.8);
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.wizard-back-header-btn:hover {
  background: rgba(50, 50, 50, 0.9);
  transform: scale(1.1);
}

.wizard-back-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.advance-wizard-header h2 {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.advance-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* ========== Progress Bar ========== */
.wizard-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  flex-shrink: 0;
}

.progress-step {
  flex: 1;
  height: 4px;
  background: #333;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.progress-step.active {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.progress-step.completed {
  background: #FFD700;
}

.progress-text {
  color: #666;
  font-size: 12px;
  margin-left: 10px;
  white-space: nowrap;
}

/* ========== Step Container ========== */
.wizard-steps-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.wizard-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.wizard-step.active {
  display: flex;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 10;
}

.wizard-step.exit-left {
  display: flex;
  opacity: 0;
  transform: translateX(-50px);
  z-index: 5;
}

/* ========== Step Content ========== */
.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
  text-align: center;
}

.step-description {
  color: #888;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 20px;
}

.step-hint {
  margin-top: 12px;
  text-align: center;
}

.step-hint-text {
  color: #666;
  font-size: 12px;
  font-style: italic;
}

/* ========== Input Styles - Search bar style ========== */
.wizard-input-wrapper {
  margin-bottom: 12px;
}

.wizard-input {
  width: 100%;
  background: #1a1a1a;
  border: 2px solid #444;
  border-radius: 25px;
  padding: 14px 20px;
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.wizard-input:focus {
  border-color: #FFD700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.wizard-input::placeholder {
  color: #666;
}

/* ========== Quick Options ========== */
.quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-option {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 8px 16px;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-option:hover {
  background: #252525;
  border-color: #FFD700;
  color: #fff;
}

.quick-option.selected {
  background: rgba(255, 215, 0, 0.15);
  border-color: #FFD700;
  color: #FFD700;
}

/* ========== Navigation Buttons ========== */
.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-shrink: 0;
}

.wizard-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.wizard-btn-next {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
}

.wizard-btn-next:hover {
  transform: scale(1.02);
}

.wizard-btn-next:active {
  transform: scale(0.98);
}

/* ========== Confirmation Step ========== */
.confirmation-summary {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.summary-item {
  padding: 12px 0;
  border-bottom: 1px solid #222;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  color: #FFD700;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.summary-value {
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}

.summary-value.empty {
  color: #666;
  font-style: italic;
}

/* Confirmation scroll container */
.confirmation-scroll-container {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.confirmation-scroll-container::-webkit-scrollbar {
  width: 4px;
}

.confirmation-scroll-container::-webkit-scrollbar-track {
  background: #222;
}

.confirmation-scroll-container::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 2px;
}

.wizard-btn-confirm {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  width: 100%;
}

/* ========== Responsive ========== */
@media (max-width: 500px) {
  .advance-wizard {
    padding: 16px;
    padding-top: calc(env(safe-area-inset-top, 16px) + 10px);
  }

  .advance-wizard-header h2 {
    font-size: 1rem;
  }

  .step-title {
    font-size: 1.1rem;
  }

  .step-description {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .wizard-input {
    padding: 12px 18px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .wizard-btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .quick-options {
    gap: 6px;
  }

  .quick-option {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ========== Keyboard Open State ========== */
@media (max-height: 480px) {
  .step-title {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .step-description {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .step-hint {
    display: none;
  }

  .wizard-nav {
    margin-top: 8px;
  }

  .wizard-btn {
    padding: 10px 14px;
  }

  .quick-options {
    display: none;
  }
}
