/* ==========================================================================
   order.css — "Book Now" card button + delivery order modal
   Self-contained: every class is prefixed (ko- / book-now-) so it can be
   loaded next to index.css without touching any existing rule.
   ========================================================================== */

/* --- Card level "Book Now" button ---------------------------------------- */
.book-now-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.book-now-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-now-btn:hover {
  transform: translateY(-2px);
}

.book-now-btn:hover::before {
  transform: scaleX(1);
}

.book-now-btn:focus-visible {
  outline: 2px solid var(--accent-gold, #C5A880);
  outline-offset: 3px;
}

.book-now-btn .book-now-label {
  position: relative;
  z-index: 1;
  transition: color 0.35s ease;
}

.book-now-btn .book-now-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-now-btn:hover .book-now-icon {
  transform: translateX(4px);
}

/* Light surfaces (signatures, offers, catering) */
.book-now-btn--light {
  border-color: var(--accent-gold, #C5A880);
  color: var(--text-dark, #1E1B18);
}

.book-now-btn--light::before {
  background: var(--accent-gold, #C5A880);
}

.book-now-btn--light:hover {
  color: var(--text-dark, #1E1B18);
  box-shadow: 0 12px 24px rgba(197, 168, 128, 0.32);
}

/* Menu page fiery cards sit on saturated colours: keep it glassy */
.menu-fiery-card .book-now-btn {
  z-index: 3;
  margin-top: 1rem;
  width: 100%;
  max-width: 220px;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: inherit;
}

.menu-fiery-card .book-now-btn::before {
  background: rgba(255, 255, 255, 0.95);
}

.menu-fiery-card .book-now-btn:hover {
  border-color: #fff;
  color: #171717;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

/* Gallery cards reveal the button inside the hover overlay */
.gallery-card .book-now-btn {
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
  margin-top: 0.9rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.66rem;
}

.gallery-card .book-now-btn::before {
  background: #fff;
}

.gallery-card .book-now-btn:hover {
  color: #171717;
}

/* --- Modal shell ---------------------------------------------------------- */
.ko-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ko-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.ko-modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(30, 27, 24, 0.78), rgba(12, 10, 9, 0.92));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ko-modal__panel {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: hidden auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  background: var(--bg-primary, #FAF7F2);
  border: 1px solid var(--border-medium, rgba(197, 168, 128, 0.45));
  border-radius: 22px;
  box-shadow: 0 45px 90px rgba(0, 0, 0, 0.45);
  transform: translateY(26px) scale(0.96);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  scrollbar-width: thin;
}

.ko-modal.is-open .ko-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ko-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  z-index: 4;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-medium, rgba(197, 168, 128, 0.45));
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.9);
  color: var(--text-dark, #1E1B18);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.ko-modal__close:hover {
  transform: rotate(90deg);
  background: var(--accent-gold, #C5A880);
  color: #fff;
}

/* --- Left summary rail ---------------------------------------------------- */
.ko-modal__aside {
  position: relative;
  padding: 2.4rem 2rem;
  background: linear-gradient(160deg, #221d19 0%, #3a2f26 55%, #55442f 100%);
  color: #F8F4E8;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  overflow: hidden;
}

.ko-modal__aside::after {
  content: "";
  position: absolute;
  inset: -40% -60% auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 168, 128, 0.35), transparent 65%);
  animation: koAuraDrift 9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes koAuraDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-40px, 40px, 0) scale(1.18); }
}

.ko-aside__tag {
  font-family: var(--font-accent, "Cormorant Garamond", serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent-gold, #C5A880);
}

.ko-aside__title {
  font-family: var(--font-serif, "Playfair Display", serif);
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0;
}

.ko-aside__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(197, 168, 128, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.ko-aside__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: koThumbIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes koThumbIn {
  from { transform: scale(1.18); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.ko-aside__meta {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.9rem;
  margin-top: auto;
}

.ko-aside__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(248, 244, 232, 0.18);
}

.ko-aside__row span:first-child {
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.7rem;
  align-self: center;
}

.ko-aside__row strong {
  font-size: 1rem;
}

.ko-aside__total strong {
  color: var(--accent-gold, #C5A880);
  font-size: 1.5rem;
  font-family: var(--font-serif, "Playfair Display", serif);
}

.ko-aside__note {
  font-size: 0.78rem;
  opacity: 0.7;
  line-height: 1.5;
}

/* --- Form side ------------------------------------------------------------ */
.ko-modal__body {
  padding: 2.4rem 2.2rem;
}

.ko-modal__heading {
  font-family: var(--font-serif, "Playfair Display", serif);
  font-size: 1.6rem;
  margin: 0 0 0.35rem;
  color: var(--text-dark, #1E1B18);
}

.ko-modal__sub {
  font-size: 0.9rem;
  color: var(--text-muted, #5C554E);
  margin-bottom: 1.6rem;
}

.ko-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}

.ko-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  animation: koFieldIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ko-field--full {
  grid-column: 1 / -1;
}

@keyframes koFieldIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ko-field label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-muted, #5C554E);
}

.ko-field input,
.ko-field select,
.ko-field textarea {
  width: 100%;
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 0.95rem;
  color: var(--text-dark, #1E1B18);
  background: #fff;
  border: 1px solid var(--border-light, rgba(197, 168, 128, 0.25));
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.ko-field textarea {
  resize: vertical;
  min-height: 84px;
}

.ko-field input:focus,
.ko-field select:focus,
.ko-field textarea:focus {
  outline: none;
  border-color: var(--accent-gold, #C5A880);
  box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.18);
}

.ko-field input.ko-invalid,
.ko-field textarea.ko-invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12);
  animation: koShake 0.4s ease;
}

@keyframes koShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  50%      { transform: translateX(5px); }
  75%      { transform: translateX(-3px); }
}

/* Quantity stepper */
.ko-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-light, rgba(197, 168, 128, 0.25));
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  width: fit-content;
}

.ko-qty button {
  width: 40px;
  height: 42px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-dark, #1E1B18);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.ko-qty button:hover {
  background: var(--accent-gold, #C5A880);
  color: #fff;
}

.ko-qty input {
  width: 60px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-light, rgba(197, 168, 128, 0.25));
  border-right: 1px solid var(--border-light, rgba(197, 168, 128, 0.25));
  border-radius: 0;
  padding: 0.7rem 0.2rem;
}

.ko-qty input:focus {
  box-shadow: none;
}

.ko-error {
  grid-column: 1 / -1;
  display: none;
  font-size: 0.85rem;
  color: #8c1e2d;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}

.ko-error.is-visible {
  display: block;
  animation: koFieldIn 0.35s ease both;
}

.ko-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.ko-submit {
  position: relative;
  flex: 1 1 220px;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  background: var(--text-dark, #1E1B18);
  color: var(--bg-primary, #FAF7F2);
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.ko-submit:hover:not(:disabled) {
  background: var(--accent-gold, #C5A880);
  color: var(--text-dark, #1E1B18);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(197, 168, 128, 0.35);
}

.ko-submit:disabled {
  opacity: 0.65;
  cursor: progress;
}

.ko-cancel {
  background: none;
  border: none;
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 0.8rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted, #5C554E);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.ko-cancel:hover {
  color: var(--text-dark, #1E1B18);
}

/* --- Success state -------------------------------------------------------- */
.ko-success {
  display: none;
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.ko-success.is-visible {
  display: block;
}

.ko-success__mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.2rem;
}

.ko-success__mark circle,
.ko-success__mark path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: koDraw 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.ko-success__mark path {
  animation-delay: 0.45s;
}

@keyframes koDraw {
  to { stroke-dashoffset: 0; }
}

.ko-success h4 {
  font-family: var(--font-serif, "Playfair Display", serif);
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  color: var(--text-dark, #1E1B18);
}

.ko-success p {
  color: var(--text-muted, #5C554E);
  font-size: 0.95rem;
  max-width: 420px;
  margin: 0 auto 0.9rem;
}

.ko-success__ref {
  display: inline-block;
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-gold-hover, #AA8C63);
  border: 1px dashed var(--accent-gold, #C5A880);
  border-radius: 10px;
  padding: 0.5rem 1.1rem;
  margin-bottom: 1.4rem;
}

/* --- Toast ---------------------------------------------------------------- */
.ko-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: 4100;
  transform: translate(-50%, 140%);
  background: var(--text-dark, #1E1B18);
  color: var(--bg-primary, #FAF7F2);
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-size: 0.88rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: min(90vw, 460px);
  text-align: center;
}

.ko-toast.is-visible {
  transform: translate(-50%, 0);
}

body.ko-modal-open {
  overflow: hidden;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  .ko-modal__panel {
    grid-template-columns: 1fr;
  }

  .ko-modal__aside {
    padding: 2rem 1.5rem 1.5rem;
  }

  .ko-aside__thumb {
    aspect-ratio: 16 / 8;
  }

  .ko-modal__body {
    padding: 1.8rem 1.5rem 2rem;
  }
}

@media (max-width: 560px) {
  .ko-grid {
    grid-template-columns: 1fr;
  }

  .ko-modal__panel {
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ko-modal,
  .ko-modal__panel,
  .ko-field,
  .book-now-btn,
  .book-now-btn::before,
  .ko-toast {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }

  .ko-modal__aside::after,
  .ko-aside__thumb img,
  .ko-success__mark circle,
  .ko-success__mark path {
    animation: none !important;
  }

  .ko-success__mark circle,
  .ko-success__mark path {
    stroke-dashoffset: 0;
  }
}
