/* Override container for wizard */
.container {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  flex: none !important;
}

/* Ensure body doesn't overflow */
body {
  overflow-x: hidden;
}

.wizard-container {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  padding: 0.75rem;
  box-sizing: border-box;
}

.wizard-form {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

.wizard-form h2 {
  color: #004225;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-control {
  padding: 0.875rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #004225;
  box-shadow: 0 0 0 0.2rem rgba(0, 66, 37, 0.25);
  outline: none;
}

.form-text {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.btn-primary {
  background: #004225;
  border-color: #004225;
  padding: 0.875rem 2rem;
  font-weight: 500;
  border-radius: 8px;
  font-size: 1.1rem;
  width: 100%;
  max-width: 100%;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-primary:hover {
  background: #003319;
  border-color: #003319;
  transform: translateY(-1px);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 66, 37, 0.5);
}

/* Advanced Configuration Styles */
.advanced-config {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.advanced-config legend {
  color: #666;
  font-weight: 500;
  padding: 0 0.5rem;
  margin-bottom: 1rem;
}

/* Configuration section styling */
.config-section {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.config-section .form-label:first-child {
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.config-section .form-text {
  margin-bottom: 1rem;
  color: #666;
}

/* Timezone section styling */
.timezone-section {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Business type section styling */
.business-type-section {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Toggle Button Styles */
.toggle-btn {
  background-color: #004225 !important;
  border-color: #004225 !important;
  color: white !important;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background-color: #003319 !important;
  border-color: #003319 !important;
  color: white !important;
}

.toggle-btn:focus {
  background-color: #004225 !important;
  border-color: #004225 !important;
  color: white !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 66, 37, 0.25);
}

#toggleIcon {
  transition: transform 0.3s ease;
}

#toggleIcon.rotated {
  transform: rotate(180deg);
}

/* Places and Spots Styles */
.place-item {
  transition: all 0.3s ease;
}

.place-item .card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: white;
}

.place-item .card-body {
  padding: 1rem;
}

/* Add/Remove Button Improvements */
.btn-success, .btn-danger {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px; /* Better touch target */
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-width: 44px;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Remove button container improvements */
.remove-place, .remove-admin, .remove-waiter {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
}

/* Add button container improvements */
.text-center {
  margin: 1.5rem 0;
}

.text-center .btn-success {
  margin: 0;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  width: 100%;
}

/* Icon spacing in buttons */
.btn i {
  font-size: 1rem;
}

.btn-success i {
  margin-right: 0.5rem;
}

.btn-danger i {
  margin: 0;
}

/* Card spacing improvements */
.admin-item, .waiter-item, .place-item {
  margin-bottom: 1.5rem;
}

.admin-item:last-child, .waiter-item:last-child, .place-item:last-child {
  margin-bottom: 1rem;
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* Mobile optimizations */
@media (max-width: 576px) {
  .wizard-container {
    padding: 0.5rem;
    max-width: calc(100vw - 1rem);
  }

  .wizard-form {
    padding: 1rem;
    margin: 0.5rem auto;
    border-radius: 8px;
    max-width: 100%;
  }

  .wizard-form h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .form-control {
    padding: 0.75rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .form-text {
    font-size: 0.8rem;
  }

  .advanced-config {
    padding: 1rem;
  }

  .place-item .card-body {
    padding: 0.75rem;
  }

  .place-item .row > div {
    margin-bottom: 0.75rem;
  }

  /* Mobile button improvements */
  .btn-success, .btn-danger {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-height: 48px; /* Larger touch target on mobile */
  }

  .text-center .btn-success {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    width: 100%;
  }

  .btn-danger {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
    min-width: 48px;
    margin-top: 15px;
  }

  /* Better spacing on mobile */
  .admin-item, .waiter-item, .place-item {
    margin-bottom: 1.25rem;
  }

  /* Mobile configuration sections */
  .config-section, .timezone-section, .business-type-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .config-section .form-label:first-child {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
}

/* Tablet optimizations */
@media (min-width: 577px) and (max-width: 768px) {
  .wizard-container {
    padding: 1rem;
  }

  .wizard-form {
    padding: 2rem;
    max-width: 550px;
  }

  .wizard-form h2 {
    font-size: 1.75rem;
  }
}

/* Desktop optimizations */
@media (min-width: 769px) and (max-width: 1199px) {
  .wizard-container {
    padding: 2rem;
  }

  .wizard-form {
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 650px;
  }

  .wizard-form h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }

  .form-control {
    padding: 1rem;
  }

  .btn-primary {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
}

/* Large desktop optimizations */
@media (min-width: 1200px) {
  .wizard-container {
    padding: 3rem;
  }

  .wizard-form {
    padding: 3rem;
    margin: 3rem auto;
    max-width: 1200px;
  }

  .wizard-form h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }

  .form-control {
    padding: 1.25rem;
    font-size: 1.1rem;
  }

  .btn-primary {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
  }

  .form-text {
    font-size: 1rem;
  }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .wizard-form {
    margin: 0.5rem auto;
    padding: 1rem;
  }

  .wizard-form h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
}

/* Validation message styles */
.validation-message {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.validation-message.success {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
}

.validation-message.error {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

.validation-message.loading {
  color: #856404;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
}

.validation-message.neutral {
  display: none;
}

/* Disabled button styles */
.btn-primary:disabled {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  cursor: not-allowed;
  opacity: 0.65;
}

.btn-primary:disabled:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  transform: none !important;
}