/* chat.css - the help bubble in the corner and its chat area */
[hidden] { display: none !important; }   /* the chat panel and its parts close on every page, whatever else the page loads */
.chat { position: fixed; right: 22px; bottom: 22px; z-index: 65; }
.chat-fab {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--blue), #174a96); box-shadow: 0 12px 30px rgba(31, 95, 191, .4);
  display: grid; place-items: center; transition: transform .2s ease, box-shadow .2s;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 36px rgba(31, 95, 191, .45); }
.chat-fab .ico { width: 28px; height: 28px; grid-area: 1 / 1; transition: transform .25s, opacity .2s; }
.chat-fab .ic-close { opacity: 0; transform: rotate(-90deg); }
.chat.open .chat-fab .ic-open { opacity: 0; transform: rotate(90deg); }
.chat.open .chat-fab .ic-close { opacity: 1; transform: none; }
.chat-ping { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }
.chat-ping::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--orange); animation: ping 1.8s ease-out infinite; }
.chat.seen .chat-ping { display: none; }
@keyframes ping { to { transform: scale(2.2); opacity: 0; } }

.chat-panel {
  position: absolute; right: 0; bottom: 76px; width: 380px; height: min(620px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 60px rgba(16, 24, 40, .22);
  transform-origin: bottom right; animation: chatIn .28s cubic-bezier(.2, .9, .3, 1.15) both;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

/* start screen */
.chat-home { display: flex; flex-direction: column; height: 100%; overflow: auto; }
.chat-hero { padding: 26px 22px 70px; color: #fff; background: linear-gradient(150deg, #1f5fbf, #174a96 70%); position: relative; overflow: hidden; }
.chat-hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -110px; background: radial-gradient(circle, rgba(240, 138, 36, .55), transparent 65%); }
.chat-faces { display: flex; margin-bottom: 18px; }
.chat-faces span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: #fff; color: var(--blue); border: 2px solid #1f5fbf; margin-right: -8px; }
.chat-faces span:nth-child(2) { background: var(--orange-soft); color: #b8600c; }
.chat-faces .bot { background: var(--orange); color: #fff; }
.chat-hero h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; position: relative; z-index: 1; }
.chat-hero p { margin: 0; color: rgba(255, 255, 255, .82); position: relative; z-index: 1; }
.chat-cards { padding: 0 14px 16px; margin-top: -50px; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 2; }
.chat-start, .chat-tg, .chat-quick { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 14px rgba(16, 24, 40, .06); }
.chat-start { display: flex; align-items: center; gap: 12px; padding: 16px; font: inherit; text-align: left; cursor: pointer; color: var(--ink); transition: border-color .15s, transform .15s; }
.chat-start:hover { border-color: var(--blue); transform: translateY(-1px); }
.chat-start > span { flex: 1; display: flex; flex-direction: column; }
.chat-start small, .chat-tg small, .chat-title small { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chat-start .ico { color: var(--blue); }
.online { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.chat-quick { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.chat-k { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px 6px; }
.chat-quick button { text-align: left; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; border-radius: 9px; padding: 9px 10px; cursor: pointer; display: flex; justify-content: space-between; }
.chat-quick button::after { content: "›"; color: var(--muted); }
.chat-quick button:hover { background: var(--bg); color: var(--blue); }
.chat-tg { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.chat-tg .ico { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: #e6f3fb; color: #229ed9; }
.chat-tg > span { display: flex; flex-direction: column; }

/* chat screen */
.chat-room { display: flex; flex-direction: column; height: 100%; animation: chatIn .22s ease both; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), #e0731a); color: #fff; flex: none; }
.chat-title { flex: 1; display: flex; flex-direction: column; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fc; }
.msg { max-width: 82%; min-width: 0; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; animation: msgIn .25s ease-out both;
       white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }   /* long words and links break onto the next line */
.msg a { color: inherit; font-weight: 600; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.staff { align-self: flex-start; background: #fff7ed; border: 1px solid #fed7aa; border-bottom-left-radius: 5px; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.msg-name { display: block; font-size: 12px; color: #b8600c; margin-bottom: 3px; }
.msg-text { display: block; }
.msg-system { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: var(--muted); background: #eef1f5;
              padding: 6px 12px; border-radius: 999px; white-space: pre-wrap; overflow-wrap: anywhere; animation: msgIn .25s ease-out both; }
.msg-pic { margin: -3px -6px 6px; display: flex; flex-direction: column; gap: 4px; }
.msg-pic img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; background: #e5e9f0; object-fit: contain; }
.msg-dl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; text-decoration: none; opacity: .85; }
.msg-dl .ico { width: 15px; height: 15px; }
.msg-file { display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-bottom: 6px; border-radius: 12px; text-decoration: none;
            background: rgba(15, 23, 42, .06); color: inherit; font-weight: 400 !important; }
.msg.me .msg-file { background: rgba(255, 255, 255, .16); }
.msg-file:hover { background: rgba(15, 23, 42, .1); }
.msg-file-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.msg-file-info strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file-info small { font-size: 11.5px; opacity: .75; }
.msg-file .ico { flex: none; width: 22px; height: 22px; }
.msg time { display: block; font-size: 11px; opacity: .6; margin-top: 4px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 5px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; animation: dot 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; background: #f7f9fc; }
.chat-chips:empty { display: none; }
.chat-chips button { flex: none; font: inherit; font-size: 13px; color: var(--blue); background: #fff; border: 1px solid #c7d6ee; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chat-chips button:hover { background: var(--blue-soft); }
/* "Pick a date" (the form guide asks a date): the browser's own calendar opens from it */
.chat-chips .chat-cal { position: relative; display: inline-flex; align-items: center; gap: 6px; color: #fff; background: var(--blue); border-color: var(--blue); font-weight: 600; }
.chat-chips .chat-cal:hover { background: var(--blue); filter: brightness(1.08); }
.chat-chips .chat-cal .ico { width: 15px; height: 15px; }
.chat-chips .chat-act { color: #fff; background: var(--blue); border-color: var(--blue); font-weight: 600; }
.chat-chips .chat-act:hover { background: var(--blue); filter: brightness(1.08); }
/* "Download watermarked (free)" next to Pay: a plain download link that looks like the other buttons */
.chat-chips .chat-dl { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--blue); background: #fff;
  border: 1px solid #c7d6ee; border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.chat-chips .chat-dl:hover { background: var(--blue-soft); }
.chat-chips .chat-dl .ico { width: 15px; height: 15px; }
.chat-chips .chat-cal input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; }
.chat-humanbar { padding: 8px 12px 0; background: #f7f9fc; }
.chat-humanbar[hidden] { display: none; }
.chat-humanbar button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600;
                        color: #b8600c; background: var(--orange-soft); border: 1px solid #fed7aa; border-radius: 12px; padding: 9px 12px; cursor: pointer; }
.chat-humanbar button:hover { background: #ffe4c7; }
.chat-humanbar .ico { width: 18px; height: 18px; }
.chat-human-card .ico { color: var(--orange) !important; }
.chat-attached { padding: 8px 12px 0; background: #fff; border-top: 1px solid var(--line); }
.attach-chip { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; font-size: 13px; }
.attach-chip img { width: 36px; height: 36px; object-fit: cover; border-radius: 7px; }
.attach-chip > .ico { width: 22px; height: 22px; color: var(--blue); }
.attach-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-err { margin: 0; padding: 8px 14px 0; font-size: 13px; color: var(--bad); background: #fff; }
.chat-input { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-attached:not([hidden]) + .chat-err + .chat-input, .chat-attached:not([hidden]) + .chat-err[hidden] + .chat-input { border-top: 0; }
.chat-input textarea { flex: 1; min-width: 0; resize: none; max-height: 130px; padding: 11px 14px; font: inherit; font-size: 14.5px; line-height: 1.4;
                       border: 1px solid var(--line); border-radius: 20px; background: #f8fafc; outline: none; overflow-y: auto;
                       white-space: pre-wrap; overflow-wrap: anywhere; }   /* the box wraps to the next line and grows */
.chat-input textarea:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(31, 95, 191, .12); }
.chat-input button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .1s; }
.chat-clip { width: 40px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--muted); cursor: pointer; transition: color .15s, background .15s; }
.chat-clip:hover, .chat-clip:focus-within { color: var(--blue); background: var(--blue-soft); }
.chat-clip .ico { width: 22px; height: 22px; }
.chat-input.sending button { opacity: .6; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat.with-human .chat-avatar { background: linear-gradient(135deg, var(--blue), #174a96); font-weight: 700; }
.chat-input button:active { transform: scale(.94); }

@media (max-width: 760px) {
  .chat { right: 14px; bottom: 14px; }
  .chat-fab { width: 54px; height: 54px; }
  .chat.open .chat-fab { display: none; }
  .chat-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; animation-name: chatUp; }
  .chat-home .chat-hero { padding-top: 22px; }
  @keyframes chatUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
}
/* the close (X) buttons show on every screen, not only on phones */
.chat-mobile-close { display: grid !important; position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(255, 255, 255, .2); color: #fff; }
.chat-mobile-close:hover { background: rgba(255, 255, 255, .32); }
.chat-x { display: grid; }
.chat-new { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted);
            background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.chat-new:hover { color: var(--blue); border-color: #c7d6ee; background: var(--blue-soft); }
.chat-new .ico { width: 14px; height: 14px; }

.typing.staff-typing { align-items: center; }
.typing-who { font-size: 12px; color: var(--muted); margin-left: 6px; }

/* design cards in a helper message ("do you have a staff pass?"): picture, title, price, Open */
.msg-designs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dcard { display: grid; grid-template-columns: 64px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  background: #fff; border: 1px solid #dfe6f0; border-radius: 12px; padding: 8px; }
.dcard img { grid-row: 1 / span 2; width: 64px; height: 44px; object-fit: cover; border-radius: 6px; background: #eef2f7; }
.dcard-info { display: flex; flex-direction: column; min-width: 0; }
.dcard-info strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard-info small { font-size: 12px; color: #6b7686; }
.dcard-price { grid-row: 2; grid-column: 2; font-size: 13px; font-weight: 700; color: #0f172a; }
.dcard-open { grid-row: 1 / span 2; grid-column: 3; font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: var(--blue);
  border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.dcard-open:hover { filter: brightness(1.08); }

/* "show me where": the page goes dim, the place lights up, with a short label (the tap still reaches the button) */
.vc-spot { position: fixed; z-index: 95; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .55);
  outline: 3px solid #f08a24; outline-offset: 0; transition: top .15s, left .15s, width .15s, height .15s; animation: vcspot 1.2s ease-in-out infinite alternate; }
@keyframes vcspot { from { outline-color: #f08a24; } to { outline-color: #ffd29e; } }
.vc-spot-tip { position: fixed; z-index: 96; pointer-events: none; background: #fff; color: #0f172a; font-size: 14px; line-height: 1.4;
  padding: 10px 12px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: reduce) { .vc-spot { animation: none; transition: none; } }

/* a card support made for this customer: the watermarked picture, the price, Pay / Download watermarked / Ask for a change */
.scard { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.scard-pic img { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 10px; background: #e5e9f0; }
.scard-price { margin: 0; font-size: 13.5px; font-weight: 700; color: #0f172a; }
.scard-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.scard-btns .chat-act { font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: var(--blue); border: 1px solid var(--blue);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.scard-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; color: var(--blue); background: #fff;
  border: 1px solid #c7d6ee; border-radius: 999px; padding: 6px 12px; cursor: pointer; text-decoration: none; }
.scard-btn.main { color: #fff; background: #1f9d55; border-color: #1f9d55; font-weight: 600; }
.scard-btn .ico { width: 15px; height: 15px; }
.scard-note { margin: 0; font-size: 12.5px; color: #5b6575; }
.scard-note:empty { display: none; }
.scard-gone { margin: 0; font-size: 13px; color: #8f1d1d; }
