/* In-chat HiFi chrome for /try. Tokens adapted from the owner-attached
   2026-07-19 HiFrame pack (light shell, native cards, operational rows).
   Restaurant/order/cart/payment frames were not copied. This page is a
   site trial, not a messaging-app account. */

.try-body {
  --wa-wallpaper: #ECE5DD;
  --wa-header: #F6F5F3;
  --wa-header-line: #e2e0dc;
  --wa-in: #ffffff;
  --wa-out: #D9FDD3;
  --wa-action: #008069;
  --wa-action-press: #006d5b;
  --wa-meta: #9aa0a3;
  --wa-out-meta: #66a578;
  --wa-ink: #1a1a1a;
  --wa-sub: #667781;
  --wa-chip: #FDF3C8;
  --wa-chip-ink: #7a7040;
  --wa-composer: #F6F5F3;
  --wa-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
  --wa-radius-bubble: 12px;
  --wa-radius-card: 14px;
  --wa-radius-chip: 16px;
  --wa-keyboard: 0px;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  background: #000;
  color: var(--wa-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
}

.try-site-chat-notice {
  margin: 0;
  padding: 6px 12px;
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
  background: #111b21;
  color: #e9edef;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  flex-shrink: 0;
}

.try-body #rakan-root {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.try-site-chat-notice [lang="en"] {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: #8696a0;
}

.wa-phone-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.wa-stage {
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--wa-wallpaper);
  background-image:
    linear-gradient(rgba(236, 229, 221, 0.94), rgba(236, 229, 221, 0.94)),
    repeating-linear-gradient(45deg, #e0d8cd 0 2px, transparent 2px 14px);
  color: var(--wa-ink);
}

@media (min-width: 720px) {
  .try-body {
    align-items: center;
    background: #0b141a;
    padding: 16px;
    height: 100dvh;
  }

  .try-site-chat-notice {
    width: min(390px, 100%);
    margin: 0 auto 10px;
    border-radius: 10px;
    padding-top: 6px;
  }

  .try-body #rakan-root {
    width: min(390px, 100%);
    max-height: min(844px, calc(100dvh - 72px));
  }

  .wa-phone-frame {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    background: #000;
    padding: 6px;
  }

  .wa-stage {
    border-radius: 22px;
    overflow: hidden;
  }
}

.wa-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background: var(--wa-header);
  color: #111;
  border-bottom: 1px solid var(--wa-header-line);
  flex-shrink: 0;
  min-height: 52px;
}

.wa-back {
  color: #007aff;
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
  padding: 4px 6px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wa-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d2e, #c4162a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.wa-who {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}

.wa-who strong {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.wa-who span,
.wa-who em {
  font-style: normal;
  font-size: 12px;
  color: var(--wa-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-stage .wk-phone {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.wa-stage .wk-transcript {
  flex: 1;
  min-height: 0;
  overflow: auto;
  gap: 8px;
  padding: 12px 10px 10px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.wa-date-chip {
  align-self: center;
  background: var(--wa-chip);
  color: var(--wa-chip-ink);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 10.5px;
  box-shadow: var(--wa-shadow);
}

.wa-stage .wk-message {
  position: relative;
  max-width: 82%;
  background: var(--wa-in);
  color: var(--wa-ink);
  border: 0;
  border-radius: var(--wa-radius-bubble) var(--wa-radius-bubble) var(--wa-radius-bubble) 3px;
  padding: 7px 10px 5px;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: var(--wa-shadow);
  animation: none;
  white-space: pre-line;
}

.wa-stage .wk-message:empty {
  display: none;
}

/* Physical sides: guest (outgoing) always right, Khalid always left. RTL only flips the text. */
.wa-stage .wk-message[data-from="guest"] {
  margin-left: auto;
  margin-right: 0;
  background: var(--wa-out);
  color: var(--wa-ink);
  border-radius: var(--wa-radius-bubble) var(--wa-radius-bubble) 3px var(--wa-radius-bubble);
}

.wa-stage .wk-message[data-from="khalid"],
.wa-stage .wk-message[data-from="rakan"] {
  margin-left: 0;
  margin-right: auto;
}

.wa-bubble-time {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1;
  color: var(--wa-meta);
  font-style: normal;
}

.wa-stage .wk-message[data-from="guest"] .wa-bubble-time {
  color: var(--wa-out-meta);
  text-align: left;
}

.wa-stage .wk-empty,
.wa-stage .wk-skeleton {
  color: #54656f;
  background: transparent;
  border: 0;
  min-height: 0;
  padding: 8px;
}

.wa-carousel {
  align-self: stretch;
  max-width: 100%;
}

.wa-stage .wk-style-grid {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.wa-stage .wk-style-grid::-webkit-scrollbar {
  display: none;
}

.wa-stage .wk-style-card,
.wa-stage .wk-transcript .wk-style-grid {
  margin-left: 0;
  margin-right: auto;
}

.wa-stage .wk-style-card {
  flex: none;
  width: 200px;
  max-width: 200px;
  scroll-snap-align: start;
  background: var(--wa-in);
  color: var(--wa-ink);
  border: 0;
  border-radius: var(--wa-radius-card);
  padding: 0;
  overflow: hidden;
  transform: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.wa-stage .wk-style-photo {
  width: 100%;
  height: 176px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background-color: #e8e4dc;
  background-size: cover;
  background-position: center;
  cursor: zoom-in;
}

.wa-stage .wk-style-illust {
  width: 100%;
  height: 176px;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  display: block;
  background: transparent;
  pointer-events: none;
}

.wa-stage .wk-style-preview {
  z-index: 200;
}

.wa-stage .wk-style-copy {
  padding: 10px 12px 12px;
}

.wa-stage .wk-style-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wa-stage .wk-style-card .wk-style-why {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--wa-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wa-stage .wk-style-card:hover {
  transform: none;
  border-color: transparent;
}

.wa-stage .wk-chip,
.wa-stage .wk-note,
.wa-stage .wk-style-card .wk-note,
.wa-stage .wk-style-card .wk-chip,
.wa-stage .wk-style-card [data-guarantee],
.wa-stage .wk-proposed,
.wa-stage [data-flags],
.wa-stage [data-guarantee] {
  display: none;
}

.wa-stage [data-action-kind="open_official_booking"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: center;
  background: var(--wa-in);
  color: var(--wa-action);
  min-height: 44px;
  border-radius: 10px;
  box-shadow: var(--wa-shadow);
}

.wa-stage [data-component="brief-draft"] {
  max-width: 82%;
  margin-left: 0;
  margin-right: auto;
  background: var(--wa-in);
  border: 0;
  border-radius: var(--wa-radius-card);
  color: var(--wa-ink);
  padding: 10px 12px;
  box-shadow: var(--wa-shadow);
}

.wa-stage [data-component="brief-draft"] .wk-eyebrow,
.wa-stage .wa-brief-kicker {
  color: var(--wa-sub);
  letter-spacing: 0;
  font-size: 12px;
  margin: 0 0 6px;
}

.wa-stage [data-component="brief-draft"] .wk-brief-row {
  background: transparent;
  border: 0;
  padding: 4px 0;
}

.wa-stage [data-component="brief-draft"] .wk-brief-label {
  color: var(--wa-sub);
}

.wa-stage [data-component="brief-draft"] .wk-brief-value {
  color: var(--wa-ink);
}

.wa-stage [data-component="brief-draft"] .wk-pill {
  display: none;
}

.wa-stage [data-component="optional-image"] {
  padding: 0 10px 8px;
  width: 84%;
  margin-left: 0;
  margin-right: auto;
  box-sizing: border-box;
}

.wa-quick-btn,
.wa-quick button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--wa-in);
  color: var(--wa-action);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  animation: none;
  min-height: 44px;
  width: 100%;
  box-shadow: var(--wa-shadow);
  touch-action: manipulation;
}

.wa-quick-btn:active,
.wa-quick button:active {
  background: #e7f8f2;
}

.wa-stage .wk-action-row {
  flex-wrap: wrap;
  overflow: visible;
  padding: 0 10px 8px;
  justify-content: flex-start;
  width: 84%;
  margin-left: 0;
  margin-right: auto;
  box-sizing: border-box;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.wa-stage .wk-pill {
  background: var(--wa-in);
  color: var(--wa-action);
  border: 0;
  white-space: nowrap;
  animation: none;
  min-height: 44px;
  border-radius: 10px;
  box-shadow: var(--wa-shadow);
  font-weight: 600;
}

.wa-stage .wk-composer {
  background: var(--wa-composer);
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px) + var(--wa-keyboard));
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
}

.wa-stage .wk-composer > label[for="wk-composer-text"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wa-stage .wa-input-shell {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-height: 44px;
  max-height: 120px;
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.wa-stage .wk-composer textarea {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  border-radius: 0;
  background: transparent;
  color: var(--wa-ink);
  border: 0;
  padding: 11px 12px;
  resize: none;
  font-size: 16px;
  line-height: 1.4;
  overflow-y: auto;
}

.wa-stage .wk-composer [data-send="true"] {
  background: var(--wa-action);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wa-stage .wk-composer [data-send="true"]:active {
  background: var(--wa-action-press);
}

.wa-stage .wa-attach {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  font-size: 0;
  color: transparent;
  cursor: pointer;
  border-radius: 50%;
  touch-action: manipulation;
}

.wa-stage .wa-attach::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 18px;
  width: 8px;
  height: 18px;
  border: 2px solid #54656f;
  border-radius: 8px;
  transform: rotate(-35deg);
}

.wa-stage .wa-file,
.wa-stage input[type="file"].wa-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
  opacity: 0;
  color: transparent;
  font-size: 0;
  appearance: none;
}

.wa-stage .wa-file::file-selector-button,
.wa-stage .wa-file::-webkit-file-upload-button,
.wa-stage input[type="file"]::file-selector-button,
.wa-stage input[type="file"]::-webkit-file-upload-button {
  display: none;
  width: 0;
  height: 0;
}

.wa-stage .wk-bubble-photo {
  display: block;
  max-width: 180px;
  max-height: 220px;
  width: auto;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  margin: 0;
}

.wa-stage .wk-message[data-has-photo="true"] {
  max-width: 196px;
  padding: 4px;
}

.wa-stage .wk-message[data-has-photo="chip"] {
  max-width: 70%;
}

.wa-stage .wk-photo-chip {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.wa-quick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 0 10px 8px;
  width: 84%;
  margin-left: 0;
  margin-right: auto;
  box-sizing: border-box;
  justify-content: flex-start;
}

.wa-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 64px;
  margin-left: 0;
  margin-right: auto;
  background: var(--wa-in);
  border-radius: var(--wa-radius-bubble) var(--wa-radius-bubble) var(--wa-radius-bubble) 3px;
  padding: 10px 14px;
  box-shadow: var(--wa-shadow);
}

.wa-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8696a0;
  opacity: 0.4;
  animation: wa-dot 1.2s infinite ease-in-out;
}

.wa-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.wa-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes wa-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.wa-pass {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--wa-composer);
  flex-shrink: 0;
}

.wa-pass label[for="wk-try-pass-input"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wa-pass input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--wa-ink);
  padding: 10px 14px;
  font-size: 16px;
}

.wa-pass [type="submit"] {
  flex-shrink: 0;
  min-height: 44px;
}

.wa-stage .wk-consent,
.wa-stage .wk-error {
  background: var(--wa-in);
  color: var(--wa-ink);
  border: 0;
  border-radius: 10px;
  margin: 0 10px 10px;
  box-shadow: var(--wa-shadow);
}

.wa-stage .wk-error {
  padding: 12px 14px;
}

.wa-stage .wk-consent-title,
.wa-stage .wk-lead,
.wa-stage .wk-error p {
  color: var(--wa-ink);
}

.wa-stage .wk-result {
  color: #54656f;
}

.wa-stage button,
.wa-stage a[role="button"],
.wa-stage [data-send="true"] {
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  .wa-typing span {
    animation: none;
    opacity: 0.55;
  }
}
