.custom-form {
    background: var(--e-global-color-primary);
    padding-top: 30px !important;
    padding-bottom: 30px !important;
    border-radius: 12px;
    overflow-y: auto;
}

/* Form feedback AJAX */
.form-feedback {
    margin-top: 20px;
    border-radius: 8px;
    font-family: var(--e-global-typography-primary-font-family), serif;
    font-size: 15px;
}

.form-feedback .form-success {
  background-color: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 8px;
}

.form-feedback .form-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

input, textarea {
  padding: 12px;
  border: none;
  background: #f7f7f7;
  font-size: 15px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Checkbox styling per contact form */
.form-group.checkbox {
    display: block !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
}

.form-group.checkbox input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  accent-color: var(--e-global-color-secondary) !important;
  border-radius: 4px !important;
}

.custom-form .btn-submit {
  background: #9B6B43 !important; /* il tuo colore personalizzato */
  color: var(--e-global-color-aa5884c) !important;
  font-family: var(--e-global-typography-secondary-font-family), sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 0px !important; /* elimina i 25px dell'Elementor Kit */
  padding: 14px 30px !important;
  text-transform: uppercase;
  border: none !important;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

/* Stili per il selettore appuntamento (estratti da contact-form.php) */

.selected-datetime {
  display: block;
  margin-top: 5px;
  font-weight: 600;
  color: #007cba;
}

.input-slot-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.appointment-group .input-slot-picker {
  font-family: var(--e-global-typography-primary-font-family), serif;
  font-size: 15px;
  color: var(--e-global-color-aa5884c);
  display: inline-block;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid var(--e-global-color-primary, #28373E);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  height: 59px;
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
}

.appointment-group .input-slot-picker:hover,
.appointment-group .input-slot-picker:focus {
  outline: none;
}

.calendar-months {
  display: block;
  margin-bottom: 20px;
}

.calendar-feedback,
.slots-feedback {
  font-size: 14px;
  color: #666;
  margin-top: 10px;
}

.calendar-modal-open {
  overflow: hidden;
}

/* Modal styles (GHL calendar) */
.appuntamento-modal-ghl {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(17, 14, 12, 0.75);
  backdrop-filter: blur(4px);
  padding: 20px;
}

.modal-content-ghl {
  background-color: var(--colore-primario-blu) !important;
  margin: auto;
  padding: 0;
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  overflow: hidden;
  animation: calendarModalIn 0.35s ease forwards;
}

@keyframes calendarModalIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header-ghl {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1) !important;
}

.modal-header-ghl h3 {
  margin: 0;
  color: var(--e-global-color-aa5884c);
  font-size: 20px;
  font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

.modal-close {

  transition: color 0.3s ease;
  background: none !important;
  border: none !important;
}

.modal-body-ghl {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.calendar-section-ghl,
.slots-section-ghl {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Calendar styles */
.calendar-grid {
  width: 100%;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.calendar-nav {
  background: none !important;
  color: var(--e-global-color-secondary);
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.calendar-nav:hover {
  background: #e3b38d;
}

.calendar-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f7ede3;
}

.current-month {
  font-size: 18px;
  font-weight: 600;
  color: var(--e-global-color-aa5884c);
  text-transform: capitalize;
  font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 5px;
  border-bottom: none !important;
}

.weekday {
  text-align: center;
  padding: 8px;
  font-weight: 600;
  color: var(--e-global-color-aa5884c);
  font-size: 12px;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px !important;
}

.day {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.25s ease;
  font-size: 15px;
  border: 1px solid transparent;
  height: 40px;
  background-color: #737D81 !important;
  color: var(--e-global-color-aa5884c) !important;
}

.day.available, .time-slot {
  background-color: var(--colore-grigio-chiaro) !important;
  color: var(--e-global-color-secondary) !important;
}

.day.available:hover, .day.available.selected, .time-slot:hover, .time-slot.selected {
  background-color: var(--e-global-color-secondary) !important;
  color: var(--e-global-color-aa5884c) !important;
}

.day.other-month, .day.unavailable {
  background-color: #737D81 !important;
  color: var(--e-global-color-aa5884c);
  cursor: not-allowed;
  opacity: 0.5;
}

/* Time slots styles */
.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.time-slot {
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border: none !important;
}

.loading, .no-slots {
  text-align: center;
  padding: 20px;
  color: var(--e-global-color-aa5884c);
}

.calendar-section-ghl h4,
.slots-section-ghl h4 {
  margin: 0 0 15px 0;
  color: var(--e-global-color-aa5884c);
  font-size: 16px;
  font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

/* International Telephone Input Styling */
.iti {
  width: 100%;
  position: relative;
}

.iti input {
  width: 100% !important;
  padding-left: 0 !important; /* Remove left padding since flag is separate */
}

.iti__flag-container {
  display: none !important; /* Hide the integrated flag container */
}

.iti__selected-flag {
  display: none !important; /* Hide the integrated selected flag */
}

.iti__country-list {
  background: white;
  border: 1px solid var(--colore-grigio-chiaro);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.iti__country {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.iti__country:hover {
  background: #f5f5f5;
}

.iti__country.iti__highlight {
  background: #e0e0e0;
}

.iti__dial-code {
  color: #666;
  margin-left: 8px;
}

.iti__flag {
  margin-right: 8px;
}

/* Hidden container for intl-tel-input logic */
.intl-tel-input-hidden {
  position: absolute;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
}

/* Phone error message */
.phone-error {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 500;
}

.phone-input-inline-container {
    display: flex;
    position: relative;
}

