/* ============================================================
   Deedge Hotel PH — Review Form · public.css
   Standardised, pixel-perfect, all devices
   ============================================================ */

:root {
  --primary:        #920404;
  --primary-dark:   #6f0303;
  --accent-gold:    #C8A86B;
  --text:           #1a1a1a;
  --text-muted:     #666;
  --text-faint:     #999;
  --border:         #e0e0e0;
  --bg-soft:        #fafaf8;
  --card-radius:    18px;     /* single source of truth for card corners */
  --input-radius:   11px;
  --strip-radius:   10px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ── Body ──────────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  /* Mobile: full-bleed white page */
  background: #fff;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* ══ CARD ══════════════════════════════════════════════════ */
/*
 * Mobile  → full width, no radius, no shadow (edge-to-edge)
 * Desktop → centred floating card with uniform radius on ALL corners
 */
.review-card {
  background: #fff;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* No radius on mobile — image fills screen edge to edge */
  border-radius: 0;
}

/* ══ HOTEL BANNER ═══════════════════════════════════════════
 * Aspect-ratio trick (padding-bottom %) — works on every
 * browser including old iOS Safari. Image is absolute-filled.
 * Top radius matches card radius and is applied HERE so the
 * image clips cleanly at the card corners on desktop.
 ══════════════════════════════════════════════════════════ */
.hotel-banner {
  position: relative;
  width: 100%;
  /* 50% = 2:1 ratio on mobile — generous hotel photo space */
  padding-bottom: 50%;
  height: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  flex-shrink: 0;
  /* Top corners match card — bottom always 0 (body continues below) */
  border-radius: 0;          /* overridden on desktop below */
}

.hotel-banner-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  /* GPU layer — fixes iOS rendering flicker */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.hotel-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.04)  0%,
    rgba(0,0,0,.38) 50%,
    rgba(0,0,0,.72) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px 20px;
}

.hotel-logo-img {
  width: 48px; height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.15);
  padding: 5px;
  margin-bottom: 8px;
  display: block;
}

.hotel-name {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.hotel-tagline {
  color: rgba(255,255,255,.78);
  font-size: .85rem;
  margin-top: 3px;
  font-style: italic;
}

/* ── Step progress bar ─────────────────────────────────────── */
.step-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fff;
}

.step-bar-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.step-bar-track {
  flex: 1;
  height: 5px;
  background: #ebebeb;
  border-radius: 3px;
  overflow: hidden;
}

.step-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  border-radius: 3px;
  transition: width .4s ease;
}

/* ── Review body ───────────────────────────────────────────── */
.review-body {
  flex: 1;
  padding: 22px 20px 36px;
  background: #fff;
}

/* ── Section headings ──────────────────────────────────────── */
.sec-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.sec-sub {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.55;
}

/* ── Rating feedback row ───────────────────────────────────── */
.rating-feedback-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 14px;
  opacity: .28;
  transition: opacity .3s;
}

.rating-feedback-row.active { opacity: 1; }

.rf-emoji { font-size: 1.7rem; line-height: 1; }

.rf-label {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color .2s;
}

/* ═══════════════════════════════════════════════════════════
   PILL STRIP
   Shared by rating row (numbers 1–10) and category rows.
   Single border, numbers/emojis separated by vertical lines.
═══════════════════════════════════════════════════════════ */
.pill-strip {
  display: flex;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--strip-radius);
  overflow: hidden;         /* clips children to rounded corners */
  background: var(--bg-soft);
}

.pill-btn {
  flex: 1;
  min-width: 0;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  padding: 12px 2px;
  font-size: .9rem;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  line-height: 1;
  /* Prevent text selection on double-tap */
  user-select: none;
  -webkit-user-select: none;
}

.pill-btn:last-child { border-right: none; }
.pill-btn:active     { opacity: .65; }

/* Category emoji pills — taller for easier tapping */
.cat-pill { font-size: 1.3rem; padding: 13px 2px; }

/* When a strip has a selection, fade the others */
.pill-strip.has-selection .pill-btn:not(.selected) {
  opacity: .28;
}

/* ── Rating end labels ─────────────────────────────────────── */
.rating-ends {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-faint);
  font-weight: 600;
  padding: 5px 2px 0;
  margin-bottom: 2px;
}

/* ── Divider ───────────────────────────────────────────────── */
.divider { height: 1px; background: #f0f0f0; margin: 20px 0; }

/* ── Category rows ─────────────────────────────────────────── */
.cat-row { margin-bottom: 20px; }

.cat-row-label {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.cat-row-feedback {
  font-size: .82rem;
  font-weight: 700;
  margin-top: 7px;
  min-height: 16px;
  transition: color .2s;
}

/* ── Notice box ────────────────────────────────────────────── */
.notice-box {
  background: #fffbf0;
  border: 1px solid #f0e4a0;
  border-radius: 10px;
  padding: 13px 15px;
  font-size: .88rem;
  color: #7a5800;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Name row ──────────────────────────────────────────────── */
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}

/* ── Form groups ───────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 7px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--input-radius);
  padding: 12px 14px;
  font-size: 1rem;       /* 16px — prevents iOS auto-zoom */
  font-family: inherit;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-soft);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
  touch-action: manipulation;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200,168,107,.18);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.65;
}

.char-count {
  font-size: .75rem;
  color: var(--text-faint);
  text-align: right;
  margin-top: 4px;
}

/* ── Submit button ─────────────────────────────────────────── */
.btn-review {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--input-radius);
  cursor: pointer;
  text-align: center;
  letter-spacing: .2px;
  box-shadow: 0 4px 16px rgba(146,4,4,.22);
  transition: opacity .2s, transform .2s, box-shadow .2s;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  margin-bottom: 14px;
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
}

.btn-review:hover:not(:disabled) {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(146,4,4,.28);
}

.btn-review:active:not(:disabled) { transform: translateY(0); }

.btn-review:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Footer note ───────────────────────────────────────────── */
.form-footer-note {
  font-size: .78rem;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.5;
}
.form-footer-note a { color: #bbb; text-decoration: underline; }

/* ── Alert ─────────────────────────────────────────────────── */
.alert {
  padding: 13px 15px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-danger { background: #fff0f0; color: #c62828; border: 1px solid #ffcdd2; }

/* ── Photo upload ──────────────────────────────────────────── */
.photo-upload-area {
  border: 2px dashed #d0d0d0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.photo-upload-area:hover,
.photo-upload-area.drag-over {
  border-color: var(--accent-gold);
  background: rgba(200,168,107,.05);
}
.pua-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 20px;
}
.pua-icon { font-size: 1.8rem; line-height: 1; }
.pua-text { font-size: .9rem; font-weight: 600; color: #555; }
.pua-sub  { font-size: .76rem; color: var(--text-faint); }

.photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}
.photo-thumb {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-rm {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,.58); color: #fff;
  border: none; border-radius: 50%;
  width: 20px; height: 20px;
  font-size: .8rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ── Blocked & Success — vertically centred ────────────────── */
.full-center-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 40px;
  text-align: center;
  min-height: 320px;
}
.fc-icon {
  font-size: 3.8rem;
  line-height: 1;
  display: block;
  margin-bottom: 16px;
  animation: popIn .45s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.fc-title { font-size: 1.35rem; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.fc-body  { font-size: .95rem; color: var(--text-muted); line-height: 1.7; max-width: 340px; }
.fc-sub   { font-size: .85rem; color: var(--text-faint); margin-top: 10px; }

.blocked-opts {
  display: flex; flex-direction: column; gap: 10px;
  margin: 20px 0; text-align: left; width: 100%; max-width: 360px;
}
.blocked-opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.blocked-opt-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.blocked-opt strong { display: block; font-size: .9rem; color: var(--text); margin-bottom: 2px; }
.blocked-opt small  { font-size: .78rem; color: var(--text-muted); line-height: 1.55; display: block; }

/* ── Review footer ─────────────────────────────────────────── */
.review-footer {
  border-top: 1px solid #f0f0f0;
  padding: 13px 20px;
  text-align: center;
  font-size: .76rem;
  color: var(--text-faint);
  flex-shrink: 0;
  background: #fff;
}

/* ── Helpers ───────────────────────────────────────────────── */
.req { color: #e53935; font-weight: 800; }
.opt { color: var(--text-faint); font-weight: 400; font-size: .88em; }

/* ══════════════════════════════════════════════════════════
   DESKTOP — card floats over dark background
   On screens ≥ 540px the card becomes a rounded widget.
   BOTH top AND bottom corners get border-radius here.
   The hotel banner also gets the TOP radius to match.
   The review-footer keeps the BOTTOM radius.
══════════════════════════════════════════════════════════ */
@media (min-width: 540px) {
  body {
    background: linear-gradient(155deg, #1a0202 0%, #3d0808 100%);
    padding: 40px 16px 60px;
    align-items: flex-start;
  }

  .review-card {
    min-height: unset;
    border-radius: var(--card-radius);        /* all 4 corners */
    box-shadow: 0 12px 48px rgba(0,0,0,.35),
                0 2px 8px rgba(0,0,0,.2);
    overflow: hidden;   /* clip children to card radius */
  }

  /* Banner inherits clip from card overflow:hidden — no extra rule needed */
  .hotel-banner { padding-bottom: 42%; }
}

/* ── Very small phones (< 360px) ──────────────────────────── */
@media (max-width: 359px) {
  .pill-btn    { font-size: .75rem; padding: 10px 1px; }
  .cat-pill    { font-size: 1.1rem; padding: 11px 1px; }
  .review-body { padding: 18px 14px 32px; }
  .hotel-name  { font-size: 1.2rem; }
}

/* ── Landscape phones ──────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hotel-banner { padding-bottom: 28%; }
}
