/* ==========================================================================
   HAMMAD IQBAL - PROJECT QUOTATION WIZARD MODAL STYLES
   Clean, modern responsive multi-step quotation modal design system.
   ========================================================================== */

/* Modal Backdrop & Container */
.quote-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  padding: 1rem;
}

.quote-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.quote-modal-card {
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #0f172a);
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(15px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.quote-modal-backdrop.active .quote-modal-card {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.quote-modal-header {
  padding: 1.25rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

[data-theme="dark"] .quote-modal-header {
  background-color: #1e293b;
  border-bottom-color: #334155;
}

.quote-modal-header-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.quote-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.quote-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

[data-theme="dark"] .quote-modal-title {
  color: #f8fafc;
}

.quote-modal-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.quote-modal-close-btn {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #64748b;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.quote-modal-close-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

[data-theme="dark"] .quote-modal-close-btn:hover {
  background-color: #334155;
  color: #ffffff;
}

/* Progress Step Bar */
.quote-progress-bar-wrapper {
  background: #f8fafc;
  padding: 0.875rem 2rem;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .quote-progress-bar-wrapper {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

.quote-steps-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.quote-steps-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #e2e8f0;
  transform: translateY(-50%);
  z-index: 1;
}

.quote-steps-fill {
  height: 100%;
  background-color: #2563eb;
  width: 0%;
  transition: width 0.3s ease;
}

.quote-step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.quote-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #64748b;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

[data-theme="dark"] .quote-step-circle {
  background: #1e293b;
  border-color: #475569;
  color: #94a3b8;
}

.quote-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  transition: color 0.25s ease;
  white-space: nowrap;
}

/* Step Active & Completed States */
.quote-step-item.active .quote-step-circle {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.quote-step-item.active .quote-step-label {
  color: #2563eb;
  font-weight: 700;
}

.quote-step-item.completed .quote-step-circle {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.quote-step-item.completed .quote-step-label {
  color: #10b981;
}

/* Modal Body Content */
.quote-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  max-height: calc(90vh - 200px);
}

.quote-step-panel {
  display: none;
  animation: quoteFadeIn 0.3s ease forwards;
}

.quote-step-panel.active {
  display: block;
}

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

/* Panel Titles */
.quote-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .quote-panel-title {
  color: #f8fafc;
}

.quote-panel-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

/* Service Options Grid */
.quote-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.quote-service-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

[data-theme="dark"] .quote-service-card {
  background: #1e293b;
  border-color: #334155;
}

.quote-service-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.08);
}

.quote-service-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .quote-service-card.selected {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
}

.quote-service-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #2563eb;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.875rem;
  transition: all 0.2s ease;
}

.quote-service-card.selected .quote-service-icon {
  background: #2563eb;
  color: #ffffff;
}

.quote-service-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .quote-service-name {
  color: #f8fafc;
}

.quote-service-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

/* Custom Card Options (Radio Cards & Checkbox Cards) */
.quote-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.quote-option-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

[data-theme="dark"] .quote-option-card {
  background: #1e293b;
  border-color: #334155;
}

.quote-option-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

[data-theme="dark"] .quote-option-card:hover {
  background: #334155;
}

.quote-option-card input[type="radio"],
.quote-option-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

.quote-option-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

[data-theme="dark"] .quote-option-card.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.quote-option-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

[data-theme="dark"] .quote-option-label {
  color: #f8fafc;
}

/* Step 1 Two-Column Grid Layout */
.quote-step1-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .quote-step1-grid {
    grid-template-columns: 1fr;
  }
}

/* Section Headings inside Panel */
.quote-section-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 1.25rem 0 0.65rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="dark"] .quote-section-label {
  color: #93c5fd;
}

/* Currency Picker Header */
.quote-currency-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .quote-currency-wrapper {
  background: #1e293b;
  border-color: #334155;
}

.quote-currency-pills {
  display: flex;
  gap: 0.5rem;
}

.quote-curr-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="dark"] .quote-curr-pill {
  background: #0f172a;
  border-color: #475569;
  color: #cbd5e1;
}

.quote-curr-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* Calculation Display Card */
.quote-estimate-box {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
}

.quote-estimate-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #93c5fd;
  margin-bottom: 0.5rem;
}

.quote-estimate-value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.quote-estimate-disclaimer {
  font-size: 0.825rem;
  color: #dbeafe;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.4;
  opacity: 0.9;
}

/* Summary Review Table in Step 5 */
.quote-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .quote-summary-box {
  background: #1e293b;
  border-color: #334155;
}

.quote-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.875rem;
}

[data-theme="dark"] .quote-summary-row {
  border-bottom-color: #334155;
}

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

.quote-summary-key {
  font-weight: 600;
  color: #64748b;
}

.quote-summary-val {
  font-weight: 700;
  color: #0f172a;
  text-align: right;
  max-width: 60%;
}

[data-theme="dark"] .quote-summary-val {
  color: #f8fafc;
}

/* Modal Footer Actions */
.quote-modal-footer {
  padding: 1.25rem 2rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

[data-theme="dark"] .quote-modal-footer {
  background: #1e293b;
  border-top-color: #334155;
}

.quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quote-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.quote-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="dark"] .quote-btn-secondary {
  background: #0f172a;
  color: #cbd5e1;
  border-color: #334155;
}

.quote-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.quote-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.quote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Validation Feedback Alert */
.quote-alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.quote-alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.quote-alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Secondary CTA label below hero button */
.hero-cta-subtext {
  display: block;
  font-size: 0.825rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Searchable / Styled Select Box for Countries */
.quote-select-wrapper {
  position: relative;
}

.quote-select-wrapper select {
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem;
  padding-right: 2.5rem;
}

/* Success View Layout */
.quote-success-view {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.quote-success-icon {
  width: 70px;
  height: 70px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  margin: 0 auto 1.25rem auto;
}

.quote-success-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .quote-success-title {
  color: #f8fafc;
}

.quote-success-desc {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 480px;
  margin: 0 auto 1.75rem auto;
  line-height: 1.5;
}

/* RESPONSIVE DESIGN BREAKPOINTS */
@media (max-width: 991px) {
  .quote-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .quote-modal-backdrop {
    padding: 0;
  }

  .quote-modal-card {
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .quote-modal-header {
    padding: 1rem 1.25rem;
  }

  .quote-progress-bar-wrapper {
    padding: 0.75rem 1rem;
  }

  .quote-step-label {
    display: none; /* Hide labels on mobile to save space */
  }

  .quote-modal-body {
    padding: 1.25rem 1rem;
    max-height: calc(100vh - 180px);
  }

  .quote-services-grid {
    grid-template-columns: 1fr;
  }

  .quote-cards-grid {
    grid-template-columns: 1fr;
  }

  .quote-estimate-value {
    font-size: 2rem;
  }

  .quote-modal-footer {
    padding: 1rem 1.25rem;
  }
}
