/* ============================================
   DIVER INFORMATION FORM - SHOPIFY-INSPIRED
   Matches checkout.css styling
   ============================================ */

.diver-info-container {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.diver-info-container h2 {
  font-size: 28px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 24px;
  text-align: center;
}

/* Unit Selection */
.diver-info-container > div:first-of-type {
  background: #ffffff;
  border: 1px solid #e1e3e5;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.diver-info-container label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

#unit-selection {
  width: 100%;
  max-width: 300px;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background-color: #ffffff;
  transition: all 0.15s ease;
}

#unit-selection:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Diver Group Container */
.diver-group {
  background: #ffffff;
  border: 1px solid #e1e3e5;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

.diver-group:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Guest Header */
.guest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.guest-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.remove-diver {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.remove-diver:hover {
  background: #fecaca;
  border-color: #dc2626;
  transform: translateY(-1px);
}

/* Form Rows */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

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

/* Input Fields */
.diver-group input[type="text"],
.diver-group input[type="email"],
.diver-group input[type="number"],
.diver-group input[type="date"],
.diver-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background-color: #ffffff;
  transition: all 0.15s ease;
}

.diver-group input[type="text"]:focus,
.diver-group input[type="email"]:focus,
.diver-group input[type="number"]:focus,
.diver-group input[type="date"]:focus,
.diver-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Checkbox Styling */
.diver-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.diver-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  margin-bottom: 12px;
}

/* Field Groups */
.course-fields,
.essential-fields,
.diving-fields {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.experience-level,
.last-dive,
.nitrox-certified {
  margin-bottom: 16px;
}

/* Buttons */
#add-diver,
input[type="submit"] {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-right: 12px;
  margin-top: 12px;
}

#add-diver:hover,
input[type="submit"]:hover {
  background: var(--color-accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

#add-diver:active,
input[type="submit"]:active {
  transform: translateY(0);
}

#add-diver {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

#add-diver:hover {
  background: #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Submit Button - Primary Style */
input[type="submit"] {
  background: var(--color-primary);
  color: #ffffff;
}

/* Animated Show/Hide for Diving & Essential Fields */
.diving-fields,
.essential-fields {
  transition: all 0.3s ease-in-out;
}

/* Highlight invalid fields */
.invalid {
  border: 2px solid #dc2626 !important;
  background-color: #fee2e2;
}

.invalid:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .diver-info-container {
    padding: 0 16px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .diver-group {
    padding: 20px;
  }

  .guest-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .remove-diver {
    width: 100%;
    justify-content: center;
  }

  #add-diver,
  input[type="submit"] {
    width: 100%;
    margin-right: 0;
  }
}