/* Private Event Reservation Form Styles */

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators for better keyboard navigation */
.form-control:focus,
.btn:focus {
  outline: 2px solid #b6904a;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .form-control {
    border-width: 2px;
  }

  .form-control.is-valid {
    border-color: #000;
    background-color: #e6ffe6;
  }

  .form-control.is-invalid {
    border-color: #000;
    background-color: #ffe6e6;
  }
}

#private-events-info {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.7;
  text-align: left;
  background-color: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(182, 144, 74, 0.3);
  border-radius: 8px;
  padding: 25px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 2px 15px rgba(182, 144, 74, 0.08);
}

#private-events-info strong {
  color: #b6904a;
}
#private-events-info .highlighted {
  color: #b6904a;
}
#private-events-info hr {
  background-color: #b6904a;
  width: 40%;
  height: 1px;
  border: none;
}

#private-events-info strong:first-child {
  font-size: 18px;
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

.reservation-form-container {
  background-color: rgba(30, 30, 30, 0.95);
  border: 1px solid #b6904a;
  border-radius: 8px;
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 4px 20px rgba(182, 144, 74, 0.1);
  animation: fadeInUp 0.6s ease-out;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

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

.form-title {
  color: #b6904a;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #b6904a;
  padding-bottom: 15px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
}

.form-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #b6904a, transparent);
}

.form-group label {
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.form-control {
  background-color: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Montserrat', sans-serif;
  padding: 12px 15px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  z-index: 1;
}

.form-control:hover {
  background-color: rgba(50, 50, 50, 0.9);
  border-color: rgba(182, 144, 74, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
  background-color: rgba(50, 50, 50, 0.9);
  border-color: #b6904a;
  box-shadow: 0 0 0 0.2rem rgba(182, 144, 74, 0.25);
  color: rgba(255, 255, 255, 1);
  outline: none;
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.form-control.is-valid {
  border-color: #28a745;
  background-color: rgba(40, 167, 69, 0.1);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg fill='%2328a745' height='16' viewBox='0 0 16 16' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
  transition: all 0.3s ease;
}

.form-control.is-invalid {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg fill='%23dc3545' height='16' viewBox='0 0 16 16' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.invalid-feedback {
  color: #dc3545;
  font-size: 0.875rem;
  font-family: 'Montserrat', sans-serif;
  margin-top: 5px;
  display: block;
}

.form-text {
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  margin-top: 5px;
}

.btn-primary {
  background-color: #b6904a;
  border-color: #b6904a;
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 30px;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.btn-primary:hover {
  background-color: #a08142;
  border-color: #a08142;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(182, 144, 74, 0.4);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(182, 144, 74, 0.3);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(182, 144, 74, 0.5);
}

.btn-primary:disabled {
  background-color: rgba(182, 144, 74, 0.5);
  border-color: rgba(182, 144, 74, 0.5);
  color: rgba(0, 0, 0, 0.5);
  transform: none;
  box-shadow: none;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.1em;
  margin-right: 8px;
}

.alert {
  font-family: 'Montserrat', sans-serif;
  border-radius: 4px;
  margin-bottom: 20px;
  text-align: center;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.15);
  border-color: #28a745;
  color: #d4edda;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  color: #f8d7da;
}

.close {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: none;
  opacity: 0.8;
}

.close:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

/* Number of guests input group styling */
.guest-btn {
  background-color: rgba(182, 144, 74, 0.15);
  border-color: #b6904a;
  color: #b6904a;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0px 15px;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.guest-btn:hover {
  background-color: #b6904a;
  border-color: #b6904a;
  color: #000;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(182, 144, 74, 0.3);
}

.guest-btn:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(182, 144, 74, 0.2);
}

.guest-btn:focus {
  outline: 2px solid #b6904a;
  outline-offset: 2px;
  box-shadow: 0 0 0 0.2rem rgba(182, 144, 74, 0.4);
}

.guest-btn:disabled {
  background-color: rgba(182, 144, 74, 0.1);
  border-color: rgba(182, 144, 74, 0.3);
  color: rgba(182, 144, 74, 0.4);
  cursor: not-allowed;
  transform: none;
}

/* Number input styling (using text input with numeric validation) */
.number-input.form-control {
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}

/* Input group adjustments with 30%-40%-30% layout */
.input-group {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.input-group-prepend,
.input-group-append {
  flex: 0 0 30%; /* 30% width for buttons */
  display: flex;
}

.input-group .form-control {
  flex: 1 1 40%; /* 40% width for input */
  border-radius: 0;
  margin: 0 -1px; /* Overlap borders to avoid double borders */
}

.input-group-prepend .guest-btn,
.input-group-append .guest-btn {
  width: 100%;
  border-radius: 0;
}

.input-group-prepend .guest-btn {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.input-group-append .guest-btn {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Enhanced responsive adjustments for better mobile experience */
@media (max-width: 768px) {
  .reservation-form-container {
    padding: 20px;
    margin: 10px 5px;
  }

  .form-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }

  .form-control {
    padding: 14px 16px; /* Larger touch targets */
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 6px;
  }

  .btn-primary {
    padding: 14px 25px;
    font-size: 1rem;
    min-height: 48px; /* Touch-friendly button height */
  }

  .form-group {
    margin-bottom: 1.5rem; /* Better spacing on mobile */
  }

  .form-group label {
    margin-bottom: 10px;
    font-size: 1rem;
  }

  .guest-btn {
    padding: 0px 16px; /* Match form-control height */
    font-size: 1rem;
  }

  #private-events-info {
    padding: 20px;
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .reservation-form-container {
    padding: 15px;
    margin: 5px;
  }

  .form-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .form-control {
    padding: 16px 18px; /* Even larger for small screens */
    font-size: 16px;
  }

  .btn-primary {
    padding: 16px 20px;
    font-size: 1rem;
    width: 100%;
    min-height: 50px;
  }

  .guest-btn {
    padding: 0px 18px; /* Match form-control height */
    font-size: 1rem;
  }

  #private-events-info {
    padding: 15px;
    font-size: 12px;
    margin-bottom: 30px;
  }

  #private-events-info strong:first-child {
    font-size: 16px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .form-control:focus {
    transform: none; /* Remove hover effects on touch devices */
  }

  .btn-primary:hover {
    transform: none;
  }

  .form-control {
    -webkit-appearance: none; /* Remove iOS styling */
    appearance: none;
    border-radius: 6px;
  }
}