/**
 * Fishing reservation form styles
 * @package Colvert_Peche_Reservations
 */

.colvert-peche-reservation-form {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
}

.peche-availability-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  border-radius: 0.5rem;
}

.peche-availability-overlay.is-loading {
  display: flex;
}

.peche-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #059669;
  border-radius: 50%;
  animation: peche-spin 0.8s linear infinite;
}

.peche-loading-text {
  font-size: 0.95rem;
  color: #475569;
}

@keyframes peche-spin {
  to { transform: rotate(360deg); }
}

.peche-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.peche-map-container {
  position: static;
}

@media (min-width: 901px) {
  .peche-map-container {
    position: sticky;
    top: 1rem;
  }
}

@media (max-width: 900px) {
  .peche-form-row {
    grid-template-columns: 1fr;
  }
}

.peche-map {
  width: 100%;
  height: 400px;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.peche-map-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* POI markers (non-selectable) */
.peche-poi-marker {
  background: transparent !important;
  border: none !important;
}

.peche-poi-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-size: 14px;
  cursor: default;
}

/* Leaflet pin markers */
.peche-marker-pin.peche-marker-unavailable {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed !important;
}

.peche-marker-pin.peche-marker-selected img {
  filter: drop-shadow(0 0 4px rgba(5, 150, 105, 0.8));
}

.peche-form-fields h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
  color: #064e3b;
}

.peche-form-fields h3:first-child {
  margin-top: 0;
}

.peche-field {
  margin-bottom: 1rem;
}

.peche-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.peche-field input,
.peche-field select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
}

.peche-field input:focus,
.peche-field select:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.peche-field-row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .peche-field-row {
    grid-template-columns: 1fr;
  }
}

.peche-total-wrap {
  margin: 1rem 0;
  padding: 0.75rem;
  background: #ecfdf5;
  border-radius: 0.5rem;
  border: 1px solid #a7f3d0;
}

.peche-total-wrap #peche-total-display {
  font-size: 1.25rem;
  color: #047857;
  font-weight: 700;
}

.peche-option-chalet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-radius: 0.5rem;
  border: 1px solid #86efac;
}

.peche-option-chalet-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #065f46;
}

.peche-badge-prochainement {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #047857;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 6px;
}

.peche-reglement-box {
  max-height: 200px;
  overflow-y: auto;
  padding: 1rem;
  margin: 0.5rem 0 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #f9fafb;
  font-size: 0.875rem;
  line-height: 1.6;
}

.peche-reglement-content {
  white-space: pre-wrap;
}

.peche-reglement-accept {
  margin: 1rem 0;
}

.peche-reglement-accept label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.peche-reglement-accept input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
}

.peche-submit-btn {
  padding: 0.75rem 1.5rem;
  background: #059669;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.peche-submit-btn:hover {
  background: #047857;
}

.peche-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.peche-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.375rem;
}

.peche-message-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.peche-message-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Page template (no header) */
.peche-reservation-page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.peche-reservation-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
}

.peche-reservation-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.peche-reservation-header .peche-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-height: 48px;
}

.peche-reservation-header .peche-logo-link img,
.peche-reservation-header .peche-logo-link .custom-logo,
.peche-reservation-header .peche-logo-link svg,
.peche-reservation-page .custom-logo {
  max-height: 48px !important;
  height: auto !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain;
  display: block;
}

.peche-site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.peche-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #064e3b;
  margin: 0;
}

.peche-reservation-main {
  flex: 1;
  padding: 2rem 1rem;
}

.peche-reservation-footer {
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
}

.peche-reservation-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

.peche-reservation-footer a {
  color: #059669;
  text-decoration: none;
}

.peche-reservation-footer a:hover {
  text-decoration: underline;
}
