/* Shared table-reservation modal — colors via --rm-* (set per template) */
.rmodal-root {
  --rm-bg: #f6f1e8;
  --rm-ink: #1c1914;
  --rm-muted: #7a7368;
  --rm-accent: #1e3a2f;
  --rm-gold: #c4a056;
  --rm-line: rgba(28, 25, 20, .12);
  --rm-field: #fff;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
  box-sizing: border-box;
}
.rmodal-root *,
.rmodal-root *::before,
.rmodal-root *::after { box-sizing: border-box; }
.rmodal-root.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.rmodal-root__veil {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 8, .62);
  backdrop-filter: blur(4px);
}
.rmodal {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  grid-template-rows: minmax(0, auto);
  direction: ltr;
  background: var(--rm-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  transform: translateY(18px) scale(.97);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}
.rmodal-root.is-open .rmodal { transform: none; }

.rmodal__form {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  padding: 18px 18px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--rm-ink);
  direction: rtl;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.rmodal__close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--rm-ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  display: grid;
  place-items: center;
  font-size: 18px;
  z-index: 3;
  transition: transform .2s ease, background .2s ease;
}
.rmodal__close:hover { transform: scale(1.06); background: #fff8ef; }
.rmodal__brand {
  text-align: center;
  margin-bottom: 10px;
}
.rmodal__brand img {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain;
}
.rmodal__brand h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 900;
  color: var(--rm-accent);
}
.rmodal__brand p {
  margin: 0;
  font-size: 12.5px;
  color: var(--rm-muted);
}

.rmodal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.rmodal__field {
  position: relative;
  margin-bottom: 10px;
  min-width: 0;
}
.rmodal__field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--rm-ink);
}
.rmodal__field .rmodal__ctrl {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--rm-line);
  background: var(--rm-field);
  border-radius: 12px;
  padding: 11px 14px 11px 40px;
  font: inherit;
  font-size: 13.5px;
  color: var(--rm-ink);
  outline: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.rmodal__field textarea.rmodal__ctrl {
  min-height: 56px;
  max-height: 110px;
  resize: vertical;
  padding-top: 12px;
}
.rmodal__field .rmodal__ctrl:focus {
  border-color: var(--rm-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rm-gold) 28%, transparent);
}
.rmodal__field i {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--rm-gold);
  font-size: 15px;
  pointer-events: none;
  line-height: 1;
  overflow: hidden;
}
.rmodal__field--area i { bottom: auto; top: 36px; }

.rmodal__submit {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--rm-accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -10px 18px var(--rm-bg);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.rmodal__submit i {
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
}
.rmodal__submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--rm-accent) 35%, transparent), 0 -10px 18px var(--rm-bg);
}
.rmodal__note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--rm-muted);
  line-height: 1.7;
}

.rmodal__side {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #1a1712 center / cover no-repeat;
  color: #fff;
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  direction: rtl;
  text-align: right;
  overflow: hidden;
}
.rmodal__side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 8, .35) 0%, rgba(8, 10, 8, .72) 100%);
}
.rmodal__side > * { position: relative; z-index: 1; min-width: 0; }
.rmodal__side h3 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.6;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.rmodal__side .rmodal__rule {
  width: 64px;
  height: 2px;
  background: var(--rm-gold);
  margin: 14px 0 10px;
  border-radius: 2px;
}
.rmodal__side > p {
  margin: 0;
  font-size: 13.5px;
  opacity: .92;
}
.rmodal__feats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}
.rmodal__feats article {
  text-align: center;
  min-width: 0;
}
.rmodal__feats i {
  display: block;
  font-size: 20px;
  color: var(--rm-gold);
  margin-bottom: 6px;
  line-height: 1;
}
.rmodal__feats span {
  display: block;
  font-size: 10.5px;
  line-height: 1.5;
  opacity: .92;
  overflow-wrap: anywhere;
}

body.rmodal-lock { overflow: hidden; }

@media (max-width: 820px) {
  .rmodal {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(100dvh - 16px);
  }
  .rmodal__side {
    min-height: 132px;
    max-height: 28vh;
    order: -1;
    padding: 18px 16px;
  }
  .rmodal__feats { display: none; }
  .rmodal__form {
    max-height: none;
    padding: 18px 14px 14px;
  }
  .rmodal__grid { grid-template-columns: minmax(0, 1fr); }
  .rmodal__close { top: 10px; left: 10px; }
}
