/* Regashi chat widget (brand: yellow + ink). */
.rgc { --c-yellow: #F5B41E; --c-yellow-soft: #FFF1C7; --c-ink: #2A1B10; --c-muted: #6B5A4A; --c-line: #EDE3D2; --c-bg: #FFFDF7; --c-wa: #128C4A; position: fixed; right: 20px; bottom: 20px; z-index: 80; font-family: inherit; color: var(--c-ink); }
.rgc *, .rgc *::before, .rgc *::after { box-sizing: border-box; }
.rgc-sr, .rgc-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.rgc-fab { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--c-ink); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 8px 24px rgba(42,27,16,.28); transition: transform .18s ease-out, background .18s; }
.rgc-fab:hover { background: #4A3A2C; transform: translateY(-2px); }
.rgc-fab-mimin { width: 40px; height: auto; margin: -6px 0 -2px -6px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); animation: rgc-bob 3s ease-in-out infinite; }
.rgc-fab:hover .rgc-fab-mimin { animation: rgc-wiggle .5s ease-in-out; }
@keyframes rgc-bob { 50% { transform: translateY(-3px) rotate(-4deg); } }
@keyframes rgc-wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.rgc-fab:focus-visible, .rgc button:focus-visible, .rgc a:focus-visible, .rgc textarea:focus-visible, .rgc input:focus-visible, .rgc-log:focus-visible { outline: 3px solid var(--c-yellow); outline-offset: 2px; }
.rgc-dot { position: absolute; top: 4px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: #C2413B; border: 2px solid #fff; }
.rgc-dot[hidden] { display: none; }
.rgc.is-open .rgc-fab { display: none; }

.rgc-panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px)); height: min(600px, calc(100dvh - 40px)); background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 48px rgba(42,27,16,.28); animation: rgc-in .2s ease-out; }
.rgc-panel[hidden] { display: none; }
@keyframes rgc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.rgc-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--c-yellow); }
.rgc-head img { width: 40px; height: 40px; object-fit: contain; border-radius: 50%; background: #fff; }
.rgc-head div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.rgc-head b { font-size: 16px; }
.rgc-head small { font-size: 12px; color: #4A3A2C; }
.rgc-close { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--c-ink); cursor: pointer; }
.rgc-close:hover { background: rgba(42,27,16,.1); }

.rgc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.rgc-msg { max-width: 86%; display: grid; gap: 2px; }
.rgc-msg p { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rgc-msg small { font-size: 11px; color: var(--c-muted); padding: 0 6px; }
.rgc-msg.is-them { align-self: flex-start; }
.rgc-msg.is-them p { background: #fff; border: 1px solid var(--c-line); border-bottom-left-radius: 4px; }
.rgc-msg.is-me { align-self: flex-end; justify-items: end; }
.rgc-msg.is-me p { background: var(--c-ink); color: #fff; border-bottom-right-radius: 4px; }
.rgc-msg.is-me a { color: #FFE38A; }
.rgc-msg a { color: #8A5A00; font-weight: 600; text-decoration: underline; }
.rgc-msg.is-pending { opacity: .6; }
.rgc-msg.is-error p { border-color: #C2413B; color: #8E2B26; background: #FDF1F0; }
.rgc-typing p { display: inline-flex; gap: 4px; padding: 14px; }
.rgc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-muted); animation: rgc-blink 1.2s infinite ease-in-out; }
.rgc-typing i:nth-child(2) { animation-delay: .2s; }
.rgc-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes rgc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.rgc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.rgc-chips[hidden], .rgc-chips:empty { display: none; }
.rgc-chips button { min-height: 36px; padding: 6px 12px; border: 1px solid var(--c-yellow); border-radius: 999px; background: var(--c-yellow-soft); color: var(--c-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rgc-chips button:hover { background: var(--c-yellow); }

.rgc-contact { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 10px 16px; background: var(--c-yellow-soft); border-top: 1px solid var(--c-line); }
.rgc-contact[hidden] { display: none; }
.rgc-contact p { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 600; }
.rgc-contact input { min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid #C9BBA3; border-radius: 10px; font: inherit; font-size: 14px; background: #fff; color: var(--c-ink); }
.rgc-contact button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--c-ink); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }

.rgc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--c-line); background: #fff; }
.rgc-form textarea { flex: 1; min-height: 44px; max-height: 96px; resize: none; padding: 11px 14px; border: 1px solid #C9BBA3; border-radius: 22px; font: inherit; font-size: 16px; line-height: 1.3; color: var(--c-ink); background: #fff; }
.rgc-form button { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--c-yellow); color: var(--c-ink); cursor: pointer; }
.rgc-form button:hover { background: #E09A0B; }
.rgc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px 10px; background: #fff; }
.rgc-link { min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--c-muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.rgc-link[hidden] { display: none; }
.rgc-wa { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--c-wa); color: #fff !important; font-size: 13px; font-weight: 700; text-decoration: none; }
.rgc-wa:hover { background: #0E6E3A; }

@media (max-width: 600px) {
  .rgc { right: 12px; bottom: 12px; }
  body.has-sticky-buy .rgc { bottom: 84px; }
  .rgc.is-open { inset: 0; right: 0; bottom: 0; }
  body.has-sticky-buy .rgc.is-open { bottom: 0; z-index: 120; }
  .rgc.is-open .rgc-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
  body.admin-bar .rgc.is-open { top: 46px; }
  .rgc-fab span { display: none; }
  .rgc-fab { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .rgc-fab-mimin { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .rgc-panel, .rgc-typing i, .rgc-fab-mimin { animation: none; } .rgc-fab { transition: none; } }
@media print { .rgc { display: none; } }
