/*
|--------------------------------------------------------------------------
| Agulu Lake Resort — shared custom form-field system
|--------------------------------------------------------------------------
| Loaded once via header.php (same as theme.css), so any public page can
| opt a form into the brand's custom field look by using these classes
| instead of ad-hoc "border p-3 rounded w-full" Tailwind. Built on
| theme.css's CSS custom properties (--blue, --navy, --font-body, etc.) so
| it automatically follows whatever brand color/fonts are set in
| Admin -> Site Settings -> Appearance — nothing here is a hardcoded color.
|
| Used by: guest_details.php (checkout form), rooms/room_detail.php (rate
| selection cards), and available to any future public form.
*/

/* ================================================================== */
/* Text inputs / selects / textareas                                  */
/* ================================================================== */

.field-label {
  display: block;
  font-family: var(--font-label);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--night);
  margin-bottom: .4rem;
}
.field-label .field-optional {
  font-weight: 400;
  color: var(--gray);
  text-transform: none;
  letter-spacing: 0;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--night);
  background: #fff;
  border: 1.5px solid #e3e5e9;
  border-radius: .85rem;
  padding: .85rem 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: #a7acb5;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(var(--navy-rgb, 14,42,59), .08), 0 0 0 1px var(--blue) inset;
}

.field-input:disabled,
.field-input[readonly],
.field-select:disabled {
  background: #f6f7f8;
  color: #9aa0a9;
}

.field-textarea {
  resize: vertical;
  min-height: 6rem;
}

.field-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%23666666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
  cursor: pointer;
}

.field-group {
  margin-bottom: 1.1rem;
}
.field-row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .field-row-2 { grid-template-columns: 1fr 1fr; }
}

/* Hint / helper / error text under a field */
.field-hint {
  font-size: .75rem;
  color: var(--gray);
  margin-top: .35rem;
}
.field-error {
  font-size: .8125rem;
  color: #dc2626;
  margin-top: .35rem;
  font-weight: 500;
}

/* ================================================================== */
/* Checkboxes / radios (simple, e.g. "I agree to terms")              */
/* ================================================================== */

.field-check-row {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.field-check-row input[type="checkbox"],
.field-check-row input[type="radio"] {
  accent-color: var(--blue);
  width: 1.2rem;
  height: 1.2rem;
  margin-top: .1rem;
  flex-shrink: 0;
  cursor: pointer;
}
.field-check-row label {
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--gray);
  cursor: pointer;
  line-height: 1.5;
}
.field-check-row a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ================================================================== */
/* Radio-cards — e.g. rate-plan selection on the room detail page      */
/* ================================================================== */

.radio-card-input { position: absolute; opacity: 0; pointer-events: none; }

.radio-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1.5px solid #e3e5e9;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  background: #fff;
}
.radio-card:hover {
  border-color: var(--blue);
}
.radio-card-input:checked + .radio-card {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(var(--navy-rgb, 14,42,59), .08);
  background: var(--blue-light);
}
.radio-card__dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid #d4d7dc;
  flex-shrink: 0;
  position: relative;
  transition: border-color .2s ease;
}
.radio-card-input:checked + .radio-card .radio-card__dot {
  border-color: var(--blue);
}
.radio-card-input:checked + .radio-card .radio-card__dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--blue);
}
.radio-card__name {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .9375rem;
  color: var(--night);
}
.radio-card__meta {
  font-size: .75rem;
  color: var(--gray);
  margin-top: .15rem;
}
.radio-card__price-wrap {
  text-align: right;
  flex-shrink: 0;
}
.radio-card__price {
  font-family: var(--font-label);
  font-weight: 700;
  color: var(--blue);
  font-size: 1rem;
  text-align: right;
  white-space: nowrap;
}
.radio-card__price-sub {
  font-size: .6875rem;
  color: var(--gray);
  font-weight: 400;
}

/* ================================================================== */
/* Input groups — e.g. coupon code [input][button]                     */
/* ================================================================== */

.input-group {
  display: flex;
  gap: .6rem;
}
.input-group .field-input {
  flex: 1;
}
.input-group .btn-group-action {
  flex-shrink: 0;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .85rem;
  padding: 0 1.3rem;
  border-radius: .85rem;
  background: var(--yellow);
  color: var(--night);
  border: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
.input-group .btn-group-action:hover {
  background: var(--yellow-dark);
  transform: translateY(-1px);
}

/* ================================================================== */
/* Form section card — groups related fields with an icon + title      */
/* ================================================================== */

.form-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.75rem;
}
@media (min-width: 768px) {
  .form-card { padding: 2.25rem; }
}
.form-card__title {
  font-family: var(--font-label);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--night);
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1.3rem;
}
.form-card__title .icon-badge {
  width: 2.25rem;
  height: 2.25rem;
}
.form-section + .form-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #ececec;
}

/* ================================================================== */
/* Custom dropdown (assets/custom-select.js progressive-enhancement   */
/* of <select> — the public-site equivalent of admin's own c-select)  */
/* ================================================================== */
.c-select { position: relative; }
.c-select select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.c-select__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1.5px solid #e3e5e9;
  border-radius: .85rem;
  padding: .85rem 1rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--night);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.c-select__btn:hover { border-color: var(--blue); }
.c-select.is-open .c-select__btn,
.c-select__btn:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(var(--navy-rgb, 14,42,59), .08), 0 0 0 1px var(--blue) inset;
}
.c-select__btn-label.is-placeholder { color: #a7acb5; }
.c-select__chevron {
  flex-shrink: 0;
  width: .7rem;
  height: .7rem;
  color: #9ca3af;
  transition: transform .2s ease;
}
.c-select__chevron svg { display: block; width: 100%; height: 100%; }
.c-select.is-open .c-select__chevron { transform: rotate(180deg); }

.c-select__panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + .4rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .85rem;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.18);
  padding: .4rem;
  max-height: 16rem;
  overflow-y: auto;
  display: none;
}
.c-select.is-open .c-select__panel { display: block; }
.c-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .75rem;
  border-radius: .6rem;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--night);
  cursor: pointer;
}
.c-select__option:hover,
.c-select__option.is-active {
  background: rgba(var(--navy-rgb, 14,42,59), .05);
}
.c-select__option.is-selected {
  font-weight: 600;
  color: var(--blue);
}
.c-select__option.is-selected::after {
  content: "\2713";
  font-weight: 700;
}

/* Variant used in the currency/search panel — a compact borderless
   trigger rather than a full field, so it drops into the existing
   search-bar segment without changing that bar's layout. */
.c-select--compact {
  width: 100%;
  height: 100%;
}
.c-select--compact .c-select__btn {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: .5rem .75rem;
  height: 100%;
}
.c-select--compact .c-select__btn:hover,
.c-select--compact.is-open .c-select__btn,
.c-select--compact .c-select__btn:focus-visible {
  box-shadow: none;
  background: var(--blue-light, #eef6fb);
}
