/* ==========================================================================
   Platter Reservation Form (prf)
   Scoped, framework-free stylesheet — no Bootstrap, no shared page classes.
   ========================================================================== */

.platter-reservation-form {
  --prf-color-ink: #1b1c1c;
  --prf-color-primary: #000000;
  --prf-color-on-primary: #ffffff;
  --prf-color-gold: #8a6a22;
  --prf-color-gold-soft: #fed488;
  --prf-color-surface: #fbf9f8;
  --prf-color-surface-alt: #ffffff;
  --prf-color-line: rgba(27, 28, 28, 0.14);
  --prf-color-muted: #6b6e6e;
  --prf-color-error: #b3261e;
  --prf-color-error-bg: #fdecea;
  --prf-color-success: #2e5339;
  --prf-color-success-bg: #eaf3ec;
  --prf-color-disabled-bg: #f1efed;

  --prf-font-display: "Playfair Display", Georgia, serif;
  --prf-font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --prf-radius: 2px;

  font-family: var(--prf-font-body);
  color: var(--prf-color-ink);
  box-sizing: border-box;
}

.platter-reservation-form *,
.platter-reservation-form *::before,
.platter-reservation-form *::after {
  box-sizing: inherit;
}

/* ---------- Two-column layout ---------------------------------------- */
.prf-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

@media (min-width: 900px) {
  .prf-layout {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 48px;
  }
}

.prf-panel-wrap {
  min-width: 0;
}

/* ---------- Visual panel (restaurant layout / table image) ----------- */
.prf-visual {
  order: -1;
}

@media (min-width: 900px) {
  .prf-visual {
    order: 0;
    position: sticky;
    top: 24px;
  }
}

.prf-visual-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--prf-radius);
  border: 1px solid var(--prf-color-line);
  background-color: var(--prf-color-surface);
}

@media (max-width: 899px) {
  .prf-visual-frame {
    aspect-ratio: 16 / 9;
  }
}

.prf-visual-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.prf-visual-img[hidden] {
  display: none;
}

.prf-visual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--prf-color-surface) 0%, var(--prf-color-disabled-bg) 100%);
  color: var(--prf-color-muted);
}

.prf-visual-placeholder[hidden] {
  display: none;
}

.prf-visual-placeholder .dashicons {
  width: 44px;
  height: 44px;
  font-size: 44px;
  opacity: 0.3;
}

.prf-visual-caption {
  margin: 16px 2px 0;
  font-size: 0.88rem;
  color: var(--prf-color-muted);
  line-height: 1.5;
  transition: color 0.2s ease;
}

.prf-visual-caption strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--prf-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--prf-color-ink);
}

/* ---------- Panel ---------------------------------------------------- */
.prf-panel {
  padding: 32px 24px 36px;
  background-color: var(--prf-color-surface-alt);
  border: 1px solid var(--prf-color-line);
  border-radius: var(--prf-radius);
}

@media (min-width: 640px) {
  .prf-panel {
    padding: 44px 48px 52px;
  }
}

.prf-title {
  margin: 0 0 6px;
  font-family: var(--prf-font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.4vw + 1.3rem, 2.1rem);
  color: var(--prf-color-primary);
  letter-spacing: -0.01em;
}

.prf-subtitle {
  margin: 0 0 32px;
  color: var(--prf-color-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Layout ------------------------------------------------------ */
.prf-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 560px) {
  .prf-row {
    grid-template-columns: 1fr 1fr;
  }
  .prf-row-single {
    grid-template-columns: 1fr;
  }
}

.prf-field {
  display: flex;
  flex-direction: column;
}

/* ---------- Labels & Inputs ---------------------------------------------- */
.prf-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--prf-color-muted);
}

.prf-input {
  width: 100%;
  padding: 12px 4px;
  border: none;
  border-bottom: 1px solid var(--prf-color-line);
  border-radius: 0;
  background: transparent;
  font-family: var(--prf-font-body);
  font-size: 0.98rem;
  color: var(--prf-color-primary);
  appearance: none;
  -webkit-appearance: none;
}

select.prf-input {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3e%3cpath fill='%236b6e6e' d='M6 8 0 0h12z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 11px 7px;
  padding-right: 20px;
}

.prf-input::placeholder {
  color: #a9acac;
}

.prf-input:focus {
  outline: none;
  border-bottom-color: var(--prf-color-primary);
}

.prf-input:disabled {
  color: #a9acac;
  border-bottom-style: dashed;
  cursor: not-allowed;
  background-color: transparent;
}

.prf-input:disabled::placeholder {
  color: #a9acac;
}

.prf-input option:disabled {
  color: #c7c7c7;
}

.prf-input.prf-input-invalid {
  border-bottom-color: var(--prf-color-error);
}

.prf-hint {
  margin: 8px 2px 0;
  font-size: 0.78rem;
  color: var(--prf-color-muted);
  transition: color 0.2s ease;
}

.prf-hint.prf-hint-error {
  color: var(--prf-color-error);
}

/* ---------- Submit button -------------------------------------------------- */
.prf-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 16px 32px;
  border: 1px solid var(--prf-color-primary);
  border-radius: var(--prf-radius);
  background-color: var(--prf-color-primary);
  color: var(--prf-color-on-primary);
  font-family: var(--prf-font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

@media (min-width: 560px) {
  .prf-submit-btn {
    width: auto;
  }
}

.prf-submit-btn:hover {
  background-color: #2b2b2b;
}

.prf-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.prf-submit-btn .prf-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: prf-spin 0.7s linear infinite;
  display: none;
}

.prf-submit-btn.prf-is-loading .prf-spinner {
  display: inline-block;
}

@keyframes prf-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Form message (success / error banner) -------------------------- */
.prf-form-message {
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: var(--prf-radius);
  font-size: 0.88rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.prf-form-message[hidden] {
  display: none;
}

.prf-form-message.prf-message-success {
  background-color: var(--prf-color-success-bg);
  border-color: rgba(46, 83, 57, 0.25);
  color: var(--prf-color-success);
}

.prf-form-message.prf-message-error {
  background-color: var(--prf-color-error-bg);
  border-color: rgba(179, 38, 30, 0.25);
  color: var(--prf-color-error);
}

/* ---------- Field-level error text ------------------------------------------ */
.prf-field-error {
  margin: 6px 2px 0;
  font-size: 0.78rem;
  color: var(--prf-color-error);
}
