/* MICE Yield Calculator Extensions */

body {
  margin: 0;
  padding: 0;
}

header {
  background-color: var(--vd-primary);
  color: white;
  padding: 1.5rem 0;
  box-shadow: var(--vd-shadow-md);
}

/* Custom layout grid */
.app-layout {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
}

/* Wizard step container */
.step-container {
  display: none;
}

.step-container.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Progress bar styling */
.progress-container {
  background: var(--vd-bg-card);
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--vd-shadow-sm);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--vd-border);
  transform: translateY(-50%);
  z-index: 1;
}

.progress-line-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 3px;
  background: var(--vd-primary);
  transform: translateY(-50%);
  z-index: 1;
  transition: width 0.3s ease;
}

.progress-step {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--vd-radius-full);
  background: var(--vd-bg-page);
  border: 3px solid var(--vd-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--vd-text-muted);
  z-index: 2;
  transition: var(--vd-transition);
  position: relative;
}

.progress-step.active {
  border-color: var(--vd-primary);
  background: var(--vd-bg-card);
  color: var(--vd-primary);
  box-shadow: 0 0 0 4px var(--vd-primary-light);
}

.progress-step.completed {
  border-color: var(--vd-success);
  background: var(--vd-success);
  color: white;
}

.progress-step-label {
  position: absolute;
  bottom: -1.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--vd-text-muted);
}

.progress-step.active .progress-step-label {
  color: var(--vd-primary);
  font-weight: 700;
}

.progress-step.completed .progress-step-label {
  color: var(--vd-success);
}

/* Sticky sidebar panel */
.sticky-sidebar {
  position: sticky;
  top: 2rem;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.summary-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--vd-border);
}

.summary-table tr:last-child td {
  border-bottom: none;
}

.summary-value {
  text-align: right;
  font-weight: 600;
}

.summary-highlight {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--vd-primary);
}

/* Action buttons block */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--vd-border);
}

/* Presets grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.preset-card {
  border: 2px solid var(--vd-border);
  border-radius: var(--vd-radius-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--vd-bg-card);
  transition: var(--vd-transition);
}

.preset-card:hover {
  border-color: var(--vd-primary-light);
  background: var(--vd-primary-light);
}

.preset-card.active {
  border-color: var(--vd-primary);
  background: var(--vd-primary-light);
  box-shadow: var(--vd-shadow-sm);
}

.preset-card h4 {
  margin: 0 0 0.25rem 0;
  color: var(--vd-primary);
  font-size: 0.95rem;
}

.preset-card p {
  margin: 0;
  font-size: 0.8rem;
}

/* Status markers and gauges */
.margin-gauge {
  padding: 1rem;
  border-radius: var(--vd-radius-md);
  text-align: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  transition: var(--vd-transition);
}

.margin-gauge.red {
  background-color: var(--vd-accent);
  box-shadow: 0 4px 10px rgba(200, 16, 46, 0.3);
}

.margin-gauge.yellow {
  background-color: var(--vd-warning);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.margin-gauge.green {
  background-color: var(--vd-success);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.margin-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Form layout structures */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.inline-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Tooltips */
.vd-tooltip {
  position: relative;
  display: inline-flex;
  margin-left: 0.35rem;
  cursor: help;
  color: var(--vd-text-muted);
}

.vd-tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--vd-text-main);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--vd-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: normal;
  width: 200px;
  z-index: 10;
  box-shadow: var(--vd-shadow-md);
  line-height: 1.3;
}

/* Custom list items inside F&B and Extra */
.item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.25fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--vd-bg-page);
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius-sm);
}

@media (max-width: 640px) {
  .item-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.btn-remove {
  background: none;
  border: none;
  color: var(--vd-accent);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vd-radius-full);
}

.btn-remove:hover {
  background: var(--vd-accent-light);
}

/* Print Styles */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 11pt !important;
  }
  
  header, .progress-container, .wizard-actions, .presets-grid, button, .btn-remove, .vd-tooltip, .add-item-btn-container {
    display: none !important;
  }
  
  .app-layout {
    display: block !important;
  }
  
  .vd-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 2rem !important;
    page-break-inside: avoid;
  }
  
  .vd-card::before {
    display: none !important;
  }
  
  .step-container {
    display: block !important;
  }
  
  /* Hide editing inputs, replace with static text for printing */
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  .summary-table td {
    border-bottom: 1px solid #ddd !important;
  }
  
  .margin-gauge {
    border: 2px solid #ccc !important;
    color: black !important;
    background: none !important;
    box-shadow: none !important;
  }
}

.print-only {
  display: none;
}
