/* PHX MistMaster — Reusable Components */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--success);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn:focus-visible,
.filter-btn:focus-visible,
.calendar-nav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-group .required {
  color: #EF4444;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.form-control::placeholder {
  color: var(--gray-300);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-error {
  color: #EF4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.error .form-control {
  border-color: #EF4444;
}

.form-group.error .form-error {
  display: block;
}

/* Multi-step Form */
.form-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  gap: 0;
}

.form-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-step-indicator .step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-600);
  transition: var(--transition);
}

.form-step-indicator.active .step-dot,
.form-step-indicator.completed .step-dot {
  background: var(--accent);
  color: var(--white);
}

.form-step-indicator .step-line {
  width: 60px;
  height: 2px;
  background: var(--gray-200);
  margin: 0 0.5rem;
}

.form-step-indicator.completed .step-line {
  background: var(--accent);
}

.form-panel {
  display: none;
}

.form-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

/* Calendar Widget */
.calendar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 500px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-header h3 {
  font-size: 1.1rem;
}

.calendar-nav {
  display: flex;
  gap: 0.5rem;
}

.calendar-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
}

.calendar-nav button:hover {
  background: var(--light-bg);
  border-color: var(--accent);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-grid .day-header {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gray-600);
  padding: 0.5rem;
}

.calendar-grid .day {
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.calendar-grid .day:hover {
  background: var(--light-bg);
}

.calendar-grid .day.selected {
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
}

.calendar-grid .day.disabled {
  color: var(--gray-300);
  cursor: not-allowed;
}

.calendar-grid .day.today {
  border: 2px solid var(--accent);
}

/* Time Slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.time-slot {
  padding: 0.75rem;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.time-slot:hover {
  border-color: var(--accent);
  background: var(--light-bg);
}

.time-slot.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #065F46;
}

.alert-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.file-upload:hover {
  border-color: var(--accent);
  background: var(--light-bg);
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload p {
  color: var(--gray-600);
  margin: 0;
}

.file-upload .upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Booking Form Layout */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 3rem;
}

.success-message .checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ECFDF5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: #059669;
}
