/* Booking System Styles - Matching site's minimal design */

/* Inline booking widget (on page before modal) */
#booking-widget-inline {
  max-width: 50ch;
  margin: 4rem 0 2rem 0;
}

#booking-widget-inline h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.booking-section {
  margin-bottom: 2rem;
}

.booking-section h4 {
  font-size: var(--type-size-2);
  margin: 0 0 0.5rem 0;
  color: var(--color-100);
  font-weight: 600;
  line-height: 1.5rem;
}

.booking-section > p {
  margin: 0 0 1rem 0;
  color: var(--color-70);
  font-size: var(--type-size-small);
  line-height: 1.5rem;
  max-width: 50ch;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Fullscreen modal */
.booking-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--blank);
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.booking-modal.active {
  display: block;
}

.modal-content {
  position: relative;
  background: var(--blank);
  min-height: 100%;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .modal-content {
    padding: 3rem 4rem;
  }
}

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

/* Modal close button */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-70);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
  z-index: 10000;
}

@media (min-width: 768px) {
  .modal-close {
    top: 0.75rem;
    right: 3.5rem;
  }
}

.modal-close svg {
  display: block;
}

.modal-close:hover {
  background: var(--color-10);
  color: var(--color-100);
}

.modal-close:focus-visible {
  outline: 2px solid var(--color-100);
  outline-offset: 2px;
}

/* Modal back button */
.modal-back {
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-70);
  padding: 0.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
  z-index: 10000;
}

@media (min-width: 768px) {
  .modal-back {
    top: 0.75rem;
    left: 3.5rem;
  }
}

.modal-back svg {
  display: block;
}

.modal-back:hover {
  background: var(--color-10);
  color: var(--color-100);
}

.modal-back:focus-visible {
  outline: 2px solid var(--color-100);
  outline-offset: 2px;
}

/* Warning Banner */
.warning-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 2rem 0;
}

.warning-banner h3 {
  color: #856404;
  margin: 0 0 0.5rem 0;
  font-size: var(--type-size-2);
  line-height: 1.5rem;
}

.warning-banner p {
  margin: 0;
  color: #856404;
  font-size: var(--type-size-small);
  max-width: none;
}

.warning-banner strong {
  color: #856404;
  font-weight: 600;
}

/* Booking Widget - Minimal integrated style */
#booking-widget {
  margin: 0;
  max-width: 100%;
  border: none;
  border-radius: 0;
  padding: 0;
}

#booking-widget::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 2.5rem;
  height: 1px;
  background: var(--color-30);
}

@media (min-width: 768px) {
  #booking-widget::before {
    top: 3rem;
  }
}

#booking-widget {
  padding-top: 1.5rem;
}

#booking-widget h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

#booking-widget > p {
  margin-bottom: 1rem;
}

/* Two-column layout */
.booking-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .booking-container {
    grid-template-columns: 1fr 380px;
    gap: 3rem;
  }
}

@media (max-width: 767px) {
  .booking-container {
    grid-template-rows: auto auto;
  }

  .booking-sidebar {
    order: 2;
  }

  .booking-steps {
    order: 1;
  }
}

.booking-steps {
  min-width: 0;
}

.booking-sidebar {
  min-width: 0;
  position: static;
  border-top: none;
  padding: 0;
}

@media (min-width: 768px) {
  .sidebar-sticky {
    position: sticky;
    top: 2rem;
    border: 1px solid var(--color-30);
    border-radius: var(--radius);
    background: var(--blank);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 13rem);
  }
}

.booking-sidebar h4 {
  font-size: var(--type-size-2);
  margin: 0;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  color: var(--color-100);
  font-weight: 600;
  line-height: 1.5rem;
  border-bottom: 1px solid var(--color-30);
}

.booking-summary-details {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-30);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: var(--type-size-small);
  line-height: 1.5rem;
}

.summary-item:last-child {
  margin-bottom: 0;
}

.summary-item .label {
  color: var(--color-70);
}

.summary-item .value {
  color: var(--color-100);
  font-weight: 500;
}

.booking-sidebar .price-summary {
  padding: 1.5rem;
  flex: 1;
}

@media (max-width: 767px) {
  .booking-sidebar .price-summary {
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
  }

  .booking-summary-details {
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 1rem;
  }

  .booking-sidebar h4 {
    background: #f8f9fa;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 1px solid var(--color-30);
  }
}

/* Step indicator - numbered circles with labels */
.step-indicators {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.step-indicators::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-30);
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  flex: 1;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blank);
  border: 2px solid var(--color-30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--type-size-small);
  font-weight: 500;
  color: var(--color-70);
  transition: all 0.2s ease;
}

.step.active .step-number {
  border-color: var(--color-100);
  background: var(--color-100);
  color: var(--blank);
}

.step-label {
  font-size: var(--type-size-smallest);
  color: var(--color-70);
  text-align: center;
  max-width: 80px;
  line-height: 1.2;
}

.step.active .step-label {
  color: var(--color-100);
  font-weight: 500;
}

@media (max-width: 640px) {
  .step-label {
    display: none;
  }

  .step {
    flex: 0;
  }
}

/* Form steps - simple show/hide */
.form-step {
  display: none;
  position: relative; /* Ensure normal flow */
  margin-top: 1.5rem;
}

.form-step.active {
  display: block;
  position: relative; /* Ensure normal flow */
  animation: fadeIn 0.15s ease-in;
}

.form-step h4 {
  font-size: var(--type-size-2);
  margin: 2rem 0 0.5rem 0;
  color: var(--color-100);
  font-weight: 600;
  line-height: 1.5rem;
}

.form-step > h4:first-child {
  margin-top: 0;
}

.form-step > p {
  margin: 0 0 1.5rem 0;
  color: var(--color-70);
  font-size: var(--type-size-small);
  line-height: 1.5rem;
  max-width: 50ch;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ShadCN-style action buttons */
.step-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  position: static !important;
  justify-content: flex-end;
}

.btn-prev,
.btn-next,
.submit-button {
  padding: 0.75rem 2rem;
  font-size: var(--type-size-small);
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5rem;
  border: none;
  outline: none;
  width: auto;
  text-align: center;
}

/* Secondary button style for Back */
.btn-prev {
  background: var(--color-10);
  color: var(--color-100);
  border: none;
}

.btn-prev:focus-visible {
  outline: 2px solid var(--color-100);
  outline-offset: 2px;
}

/* Primary button style for Continue/Submit */
.btn-next,
.submit-button {
  background: var(--color-100);
  color: var(--blank);
  font-weight: 500;
}

/* No hover states on buttons */

.btn-next:focus-visible,
.submit-button:focus-visible {
  outline: 2px solid var(--color-100);
  outline-offset: 2px;
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile: stack buttons and make full width */
@media (max-width: 640px) {
  .step-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-prev,
  .btn-next,
  .submit-button {
    width: 100%;
  }
}

.booking-sidebar .step-actions {
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .booking-sidebar .step-actions {
    margin-top: auto;
  }
}

.booking-sidebar .btn-prev,
.booking-sidebar .btn-next,
.booking-sidebar .submit-button {
  width: 100%;
}

/* Review section */
.review-section {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.review-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: var(--type-size-small);
  line-height: 1.5rem;
}

.review-item.total {
  border-top: 1px solid var(--color-30);
  padding-top: 1rem;
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: var(--type-size-1);
}

.review-label {
  color: var(--color-70);
}

.review-value {
  color: var(--color-100);
  font-weight: 500;
}

/* Form Sections - No individual borders */
.booking-section {
  margin-bottom: 2rem;
  padding: 0;
  background: transparent;
  border: none;
}

.booking-section h4 {
  font-size: var(--type-size-2);
  margin-bottom: 1rem;
  color: var(--color-100);
  font-weight: 600;
}

/* Date Selection */
.date-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

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

.date-field {
  display: flex;
  flex-direction: column;
}

.date-field label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-100);
  font-size: var(--type-size-small);
}

.date-field input[type="date"],
.date-field select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-30);
  border-radius: var(--radius);
  font-size: var(--type-size-small);
  font-family: inherit;
  background: var(--blank);
  color: var(--color-100);
  line-height: 1.5rem;
  width: 100%;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-field select {
  -webkit-appearance: none;
  appearance: none;
}

.date-field input[type="date"]:hover,
.date-field select:hover {
  border-color: var(--color-50);
}

.date-field input[type="date"]:focus,
.date-field select:focus {
  outline: 2px solid var(--color-100);
  outline-offset: 2px;
  border-color: var(--color-100);
}

/* Duration Display */
.duration-display {
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: var(--type-size-small);
  color: var(--color-100);
}

.duration-display span {
  font-weight: 600;
  color: var(--accent);
}

/* Vacuum section */
.vacuum-section {
  margin-top: 0;
  margin-bottom: 2rem;
}

.vacuum-section h4 {
  font-size: var(--type-size-2);
  margin: 0 0 0.5rem 0;
  color: var(--color-100);
  font-weight: 600;
  line-height: 1.5rem;
}

.vacuum-section > p {
  margin-bottom: 1rem;
  color: var(--color-70);
  font-size: var(--type-size-small);
  line-height: 1.5rem;
  max-width: 50ch;
}

.vacuum-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

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

.vacuum-radio {
  display: grid;
  grid-template-columns: 15% 85%;
  align-items: flex-start;
  cursor: pointer;
  padding: 1rem;
  border: 2px solid var(--color-30);
  border-radius: var(--radius);
  transition: all 0.15s ease;
  min-height: 5rem;
  text-align: left;
  background: var(--blank);
}

.vacuum-radio:hover {
  border-color: var(--color-70);
  background: var(--color-10);
}

.vacuum-radio input[type="radio"] {
  margin: 0.25rem 0 0 0;
  cursor: pointer;
  width: 18px;
  height: 18px;
  -webkit-appearance: radio;
  appearance: radio;
  justify-self: start;
}

.vacuum-radio input[type="radio"]:checked {
  accent-color: var(--color-100);
}

.vacuum-radio:has(input[type="radio"]:checked) {
  border-color: var(--color-100);
  background: var(--color-10);
}

.vacuum-radio span {
  font-size: var(--type-size-small);
  line-height: 1.5;
  color: var(--color-100);
  font-weight: 400;
  text-align: left;
}

#vacuum-warning {
  background: #fff3cd;
  border-left: 3px solid #ffc107;
  padding: 0.75rem;
  margin-top: 1rem;
  border-radius: var(--radius);
  color: #856404;
  font-size: var(--type-size-small);
}

/* Info box for important messages */
.info-box {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.info-box p {
  margin: 0;
  font-size: var(--type-size-small);
  line-height: 1.5rem;
  color: #92400e;
}

.info-box p:first-child {
  margin-bottom: 0.5rem;
}

.info-box strong {
  font-weight: 600;
}

/* Price Summary - clean and aligned to typography system */
.price-summary {
  margin-bottom: 0;
  background: transparent;
  padding: 0;
  position: relative;
  display: block;
}

.price-summary h4 {
  margin: 0 0 1rem 0;
  color: var(--color-100);
  font-size: var(--type-size-2);
  font-weight: 600;
  line-height: 1.5rem;
}

.price-line {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: var(--type-size-small);
  color: var(--color-100);
  line-height: 1.5rem;
}

.price-summary .total {
  font-size: var(--type-size-1);
  font-weight: 600;
  color: var(--color-100);
  padding: 1rem 0 0.5rem 0;
  margin-top: 0.5rem;
  border-top: 2px solid var(--color-100);
}

/* Customer Details Form */
.customer-details {
  background: transparent;
  border-radius: var(--radius);
  padding: 0;
  margin-top: 2rem;
}

.customer-details h4 {
  margin: 0 0 1.5rem 0;
  color: var(--color-100);
  font-size: var(--type-size-2);
  font-weight: 600;
}

.customer-details form {
  display: flex;
  flex-direction: column;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-100);
  font-size: var(--type-size-small);
}

.form-group label span {
  color: var(--color-danger);
  font-weight: normal;
  font-size: var(--type-size-smallest);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-30);
  border-radius: var(--radius);
  font-size: var(--type-size-small);
  font-family: inherit;
  background-color: var(--blank);
  color: var(--color-100);
  line-height: 1.5rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: var(--color-50);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-100);
  outline-offset: 2px;
  border-color: var(--color-100);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  max-width: 100%;
}

/* Agreement Checkbox */
.agreement-section {
  background: #f8f9fa;
  border: none;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1.5rem 0;
}

.agreement-checkbox {
  display: flex;
  align-items: flex-start;
}

.agreement-checkbox input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width: auto;
  height: auto;
  padding: 0;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.agreement-checkbox span {
  flex: 1;
  font-size: var(--type-size-small);
  line-height: 1.4;
  color: var(--color-100);
}

/* Submit Button - Using site button styles */
.submit-button {
  background-color: var(--button-color);
  color: var(--blank);
  border: 1px solid var(--button-color);
  padding: 0.4rem 1.5rem;
  font-size: var(--type-size-small);
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition-duration: 0.15s;
  transition-timing-function: ease;
  transition-property: border, background-color, color;
  width: auto;
  margin-top: 1.5rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.5rem;
  display: inline-block;
  align-self: flex-start;
}

.submit-button:hover:not(:disabled) {
  background-color: var(--button-hover-color);
  border-color: var(--button-hover-color);
  color: var(--blank);
}

.submit-button:focus {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

.submit-button:disabled {
  background: var(--color-30);
  border-color: var(--color-30);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .booking-section,
  .addon-section,
  .price-summary,
  .customer-details {
    padding: 1rem;
  }
}