/* Base styles — intentionally theme-neutral. */
.rf-reservas { max-width: 760px; margin: 0 auto; padding-bottom:3rem; }
.rf-reservas__header { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:1rem; }
.rf-reservas__header button { min-width:40px; }
.rf-reservas__header strong { font-size:1.4rem; }
.rf-reservas__weekdays,
.rf-reservas__days { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.rf-reservas__weekdays { text-align:center; font-weight:600; margin-bottom:6px; }
.rf-reservas__days button,
.rf-reservas__days span { min-height:42px; }
.rf-reservas__days button { cursor:pointer; transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease; border-radius:6px; }
.rf-reservas__days button.is-selected { outline:3px solid currentColor; outline-offset:2px; font-weight:700; transform:translateY(-1px); }
.rf-reservas__days button.is-unavailable { opacity:.35; cursor:not-allowed; }
.rf-reservas__slots { margin-top:1.5rem; }
.rf-reservas__slot-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.rf-slot { padding:.7rem .5rem; cursor:pointer; border-radius:6px; }
.rf-slot.is-selected { outline:3px solid currentColor; outline-offset:2px; font-weight:700; }
.rf-slot.is-unavailable { opacity:.45; cursor:not-allowed; }
.rf-reservas__form { margin-top:1.5rem; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.rf-reservas__form[hidden] { display:none !important; }
.rf-reservas__form h3, .rf-reservas__form .rf-reservas__selected-row, .rf-reservas__form .rf-reservas__modify-notice, .rf-reservas__form .rf-consent, .rf-reservas__form .rf-reservas__message, .rf-reservas__form button { grid-column:1 / -1; }
.rf-reservas__instruction { margin:.5rem 0 0; }
.rf-reservas__selected-row { display:flex; justify-content:space-between; align-items:center; gap:1.5rem; margin:0; }
.rf-reservas__selected-summary { font-weight:600; margin:0; }
.rf-reservas__hold-countdown { font-weight:700; margin:0; white-space:nowrap; }
.rf-reservas__hold-countdown[hidden] { display:none !important; }
.rf-reservas__modify-notice { font-size:.95em; margin:0; }
.rf-reservas__form label { display:grid; gap:5px; }
.rf-reservas__form input,
.rf-reservas__form select { min-height:3.1rem; height:3.1rem; line-height:1.25; }
.rf-reservas__observations { grid-column:1 / -1; }
.rf-reservas__field-label { display:block; }
.rf-reservas__form input,
.rf-reservas__form select,
.rf-reservas__form textarea { width:100%; box-sizing:border-box; padding:.65rem; border:3px solid #6b6b78 !important; border-radius:0; background:#fff; }
.rf-reservas__message { min-height:1.5em; }
.rf-reservas__form input[aria-invalid="true"],
.rf-reservas__form textarea[aria-invalid="true"],
.rf-reservas__form select[aria-invalid="true"] { outline:2px solid currentColor; outline-offset:1px; }
.rf-consent input[aria-invalid="true"] { outline:2px solid currentColor; outline-offset:2px; }
.rf-consent { display:flex !important; grid-template-columns:none !important; align-items:flex-start; gap:8px; }
.rf-consent input { width:auto; min-height:0 !important; height:1.1em; margin:.2em 0 0; }
.rf-hp { position:absolute !important; left:-9999px !important; opacity:0 !important; }
@media (max-width: 600px) {
  .rf-reservas__form { grid-template-columns:1fr; }
  .rf-reservas__form h3, .rf-reservas__form .rf-reservas__selected-row, .rf-reservas__form .rf-reservas__modify-notice, .rf-reservas__form .rf-consent, .rf-reservas__form .rf-reservas__message, .rf-reservas__form button { grid-column:1; }
  .rf-reservas__selected-row { align-items:flex-start; flex-direction:column; gap:.35rem; }
  .rf-reservas__hold-countdown { white-space:normal; }
  .rf-reservas__observations { grid-column:1; }
  .rf-reservas__slot-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* Selected time remains clearly visible while the 5-minute hold is active. */
.rf-slot.is-selected.is-held { opacity:1; cursor:default; box-shadow:0 0 0 3px currentColor; }
.rf-slot.is-selected.is-held:disabled { opacity:1; }
.rf-reservas__modify-notice[hidden] { display:none !important; }

/* Confirmation modal — intentionally small, calm and theme-neutral. */
.rf-reservas__modal-backdrop { position:fixed; inset:0; z-index:2147483647; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(0,0,0,.38); box-sizing:border-box; }
.rf-reservas__modal-backdrop[hidden] { display:none !important; }
.rf-reservas__modal { width:min(440px,100%); max-height:calc(100vh - 40px); overflow:auto; box-sizing:border-box; background:#fff; color:#222; padding:28px; box-shadow:0 18px 55px rgba(0,0,0,.22); text-align:center; }
.rf-reservas__modal h3 { margin:0 0 18px; font-size:1.45rem; }
.rf-reservas__modal p { margin:0 0 14px; line-height:1.5; }
.rf-reservas__modal-when { font-size:1.08rem; font-weight:700; }
.rf-reservas__modal button { min-width:120px; margin-top:6px; padding:.7rem 1.4rem; cursor:pointer; }
@media (max-width:600px) { .rf-reservas__modal { padding:24px 20px; } }

/* v0.8.2: availability errors span the full schedule width. */
.rf-reservas__slot-grid > span { grid-column:1 / -1; width:100%; box-sizing:border-box; line-height:1.5; }

/* v0.9.0: keep text fields geometrically stable when Divi applies :focus styles. */
.rf-reservas__form input:not([type="checkbox"]):not([type="radio"]),
.rf-reservas__form select,
.rf-reservas__form textarea {
  margin:0 !important;
  transform:none !important;
  vertical-align:middle;
}
.rf-reservas__form input:not([type="checkbox"]):not([type="radio"]):focus,
.rf-reservas__form select:focus,
.rf-reservas__form textarea:focus {
  margin:0 !important;
  padding:.65rem !important;
  border-width:3px !important;
  border-style:solid !important;
  border-color:#6b6b78 !important;
  transform:none !important;
  top:auto !important;
  bottom:auto !important;
  left:auto !important;
  right:auto !important;
  box-shadow:none !important;
}
.rf-reservas__form input:not([type="checkbox"]):not([type="radio"]):focus,
.rf-reservas__form select:focus {
  min-height:3.1rem !important;
  height:3.1rem !important;
  line-height:1.25 !important;
}

/* v1.1.0: one-tap calendar actions in the confirmation modal. */
.rf-reservas__calendar-actions { display:grid; gap:9px; margin:18px 0; }
.rf-reservas__calendar-actions[hidden] { display:none !important; }
.rf-reservas__calendar-button { display:block; box-sizing:border-box; padding:.72rem 1rem; border:1px solid currentColor; text-decoration:none; font-weight:600; line-height:1.25; }
.rf-reservas__calendar-button:hover, .rf-reservas__calendar-button:focus { text-decoration:none; }


/* v1.2.0: validated active styling for calendar actions (theme-independent). */
.rf-reservas__calendar-actions a.rf-reservas__calendar-button,
.rf-reservas__calendar-actions a.rf-reservas__calendar-button:link,
.rf-reservas__calendar-actions a.rf-reservas__calendar-button:visited {
  background-color:#3f3f46 !important;
  color:#ffffff !important;
  border:1px solid #3f3f46 !important;
  opacity:1 !important;
}
.rf-reservas__calendar-actions a.rf-reservas__calendar-button:hover,
.rf-reservas__calendar-actions a.rf-reservas__calendar-button:focus,
.rf-reservas__calendar-actions a.rf-reservas__calendar-button:active {
  background-color:#27272a !important;
  color:#ffffff !important;
  border-color:#27272a !important;
  opacity:1 !important;
}
