/* Riri Bot component styles: intentionally separate from the main site stylesheet. */
.riri-promo { position: relative; display: flex; align-items: center; gap: 11px; width: min(720px, calc(100% - 32px)); min-height: 62px; margin: 10px auto 0; padding: 9px 12px; overflow: hidden; border: 1px solid rgba(109, 63, 169, .32); border-radius: 16px; background: linear-gradient(105deg, #fff6c4, #fffdf6 62%, #f5eaff); box-shadow: 0 0 0 2px rgba(255, 222, 89, .17), 0 6px 22px rgba(78, 38, 127, .13); animation: riri-promo-glow 3.2s ease-in-out infinite; }
.riri-promo-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; background: #4e267f; color: #ffde59; font-size: 1.15rem; }
.riri-promo-copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
.riri-promo-copy strong { color: #4e267f; font: 800 .92rem/1.2 "Space Grotesk", sans-serif; }
.riri-promo-copy small { overflow: hidden; color: #6b6074; font-size: .68rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.riri-promo-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; flex: 0 0 auto; padding: 0 13px; border: 0; border-radius: 999px; background: #4e267f; color: #ffde59; cursor: pointer; font: 800 .76rem "Outfit", sans-serif; box-shadow: 0 4px 12px rgba(78, 38, 127, .22); transition: transform .2s ease, box-shadow .2s ease; }
.riri-promo-button:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(78, 38, 127, .3); }
@keyframes riri-promo-glow { 0%, 100% { box-shadow: 0 0 0 2px rgba(255, 222, 89, .16), 0 6px 20px rgba(78, 38, 127, .12); } 50% { box-shadow: 0 0 0 3px rgba(255, 222, 89, .3), 0 8px 25px rgba(78, 38, 127, .18); } }
.riri-widget { position: fixed; right: 22px; bottom: 24px; z-index: 1200; font-family: "Outfit", sans-serif; }
.riri-launcher { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 50px; padding: 6px 13px 6px 8px; border: 2px solid #fff; border-radius: 16px; background: #4e267f; color: #fff; text-align: left; cursor: pointer; box-shadow: 0 5px 0 #31114f, 0 0 0 3px rgba(255, 222, 89, .34), 0 0 22px rgba(255, 222, 89, .45); transition: transform .2s ease, box-shadow .2s ease; }
.riri-launcher:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #31114f, 0 0 0 4px rgba(255, 222, 89, .4), 0 0 26px rgba(255, 222, 89, .55); }
.riri-launcher-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 11px; background: #ffde59; color: #4e267f; font-size: 1.15rem; }
.riri-launcher-copy { display: grid; gap: 1px; }
.riri-launcher-copy strong { color: #ffde59; font: 800 .9rem "Space Grotesk", sans-serif; }
.riri-launcher-copy small { color: rgba(255,255,255,.8); font-size: .6rem; }
.riri-launcher-ping { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border: 2px solid #4e267f; border-radius: 50%; background: #5be39b; box-shadow: 0 0 0 3px rgba(91, 227, 155, .23); }
.riri-panel { position: absolute; right: 0; bottom: 62px; display: flex; flex-direction: column; width: min(390px, calc(100vw - 28px)); max-height: min(680px, calc(100svh - 96px)); overflow: hidden; border: 1px solid rgba(78, 38, 127, .25); border-radius: 23px; background: #fffdf7; color: #241238; box-shadow: 0 24px 75px rgba(33, 13, 54, .35); animation: riri-pop .2s ease-out; }
.riri-panel[hidden] { display: none; }
@keyframes riri-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.riri-header { display: flex; align-items: center; gap: 11px; min-height: 68px; padding: 12px 15px; background: #4e267f; color: #fff; }
.riri-avatar { display: grid; place-items: center; width: 41px; height: 41px; flex: 0 0 41px; border: 2px solid rgba(255,255,255,.75); border-radius: 14px; background: #ffde59; color: #4e267f; font: 900 1.2rem "Space Grotesk", sans-serif; }
.riri-heading { display: grid; gap: 2px; flex: 1; }
.riri-heading strong { color: #ffde59; font: 800 1.08rem "Space Grotesk", sans-serif; }
.riri-heading span { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.85); font-size: .7rem; }
.riri-heading i { width: 7px; height: 7px; border-radius: 50%; background: #5be39b; }
.riri-close { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; background: transparent; color: white; cursor: pointer; font-size: 1.55rem; line-height: 1; }
.riri-messages { display: grid; gap: 8px; max-height: 175px; padding: 10px 14px; overflow-y: auto; overscroll-behavior: contain; }
.riri-message { width: fit-content; max-width: 94%; padding: 9px 11px; border-radius: 13px; font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.riri-message-user { justify-self: end; border-bottom-right-radius: 4px; background: #4e267f; color: #fff; }
.riri-message-bot { justify-self: start; border: 1px solid #e7d9f5; border-bottom-left-radius: 4px; background: #f4edfb; color: #3f3050; }
.riri-faq-area { min-height: 140px; padding: 10px 13px 8px; border-top: 1px solid #eee5f5; }
.riri-section-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #78628d; font-size: .61rem; font-weight: 900; letter-spacing: .12em; }
.riri-expand { padding: 3px 0; border: 0; background: none; color: #6d3fa9; cursor: pointer; font: 800 .68rem "Outfit", sans-serif; letter-spacing: 0; white-space: nowrap; }
.riri-categories { display: flex; gap: 6px; margin: 0 -1px 8px; overflow-x: auto; scrollbar-width: thin; }
.riri-category { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #e2d4f0; border-radius: 999px; background: #fff; color: #675475; cursor: pointer; font: 700 .66rem "Outfit", sans-serif; }
.riri-category[aria-pressed="true"] { border-color: #4e267f; background: #4e267f; color: #ffde59; }
.riri-faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 118px; overflow-y: auto; overscroll-behavior: contain; padding: 1px 3px 3px 1px; }
.riri-faq-question { min-height: 38px; padding: 7px 8px; border: 1px solid #eee6f4; border-radius: 10px; background: #fff; color: #4e267f; cursor: pointer; font: 700 .68rem/1.25 "Outfit", sans-serif; text-align: left; transition: border-color .15s ease, background .15s ease; }
.riri-faq-question:hover { border-color: #9d77c3; background: #f8f2ff; }
.riri-no-results { grid-column: 1 / -1; padding: 8px 2px; color: #786c80; font-size: .72rem; }
.riri-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #eae1f0; background: #fff; }
.riri-form input { min-width: 0; flex: 1; height: 43px; padding: 0 13px; border: 1px solid #d9c9e9; border-radius: 13px; outline: 0; background: #fff; color: #241238; font: 500 .83rem "Outfit", sans-serif; }
.riri-form input:focus { border-color: #6d3fa9; box-shadow: 0 0 0 3px rgba(109, 63, 169, .13); }
.riri-form button { width: 43px; height: 43px; flex: 0 0 43px; border: 0; border-radius: 13px; background: #ffde59; color: #4e267f; cursor: pointer; font: 900 1.35rem "Outfit", sans-serif; }
.riri-footnote { padding: 0 12px 9px; background: #fff; color: #8a7d93; font-size: .61rem; text-align: center; }
.riri-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.riri-widget button:focus-visible, .riri-promo-button:focus-visible { outline: 3px solid #ffde59; outline-offset: 3px; }
html { -webkit-tap-highlight-color: transparent; }

@media (max-width: 700px) {
  .riri-promo { gap: 8px; width: calc(100% - 24px); min-height: 58px; margin-top: 8px; padding: 8px; border-radius: 14px; }
  .riri-promo-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .riri-promo-copy strong { font-size: .8rem; }
  .riri-promo-copy small { font-size: .59rem; }
  .riri-promo-button { min-height: 34px; padding: 0 10px; font-size: .69rem; }
  .riri-widget { right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .riri-panel { position: fixed; right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); left: 10px; width: auto; height: auto; max-height: min(620px, calc(100svh - 96px - env(safe-area-inset-bottom))); border-radius: 20px; }
  .riri-header, .riri-form, .riri-footnote { flex: 0 0 auto; }
  .riri-messages { flex: 0 1 auto; min-height: 0; max-height: min(150px, 20svh); }
  .riri-faq-area { flex: 0 1 auto; min-height: 0; }
  .riri-categories { flex-wrap: wrap; gap: 8px; overflow: visible; }
  .riri-category { min-height: 40px; padding: 8px 12px; font-size: .76rem; }
  .riri-faq-list { grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; }
  .riri-faq-question { min-height: 46px; padding: 10px 12px; font-size: .8rem; line-height: 1.35; }
}
@media (max-width: 380px) {
  .riri-promo-copy small { display: none; }
  .riri-promo-copy strong { font-size: .76rem; }
  .riri-panel { right: 7px; left: 7px; }
  .riri-faq-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .riri-panel { animation: none; }
  .riri-launcher, .riri-promo { transition: none; animation: none; }
}

/* Make Riri's mascot the most visible and inviting part of the widget. */
.riri-promo-icon { position: relative; width: 42px; height: 42px; flex-basis: 42px; overflow: visible; background: transparent; }
.riri-promo-icon .riri-mascot-image { width: 125%; height: 125%; object-fit: contain; }
.riri-widget { right: 24px; bottom: 28px; }
.riri-launcher { min-height: 72px; gap: 10px; padding: 7px 16px 7px 8px; border-radius: 20px; box-shadow: 0 6px 0 #31114f, 0 0 0 4px rgba(255, 222, 89, .42), 0 0 30px rgba(255, 222, 89, .58); }
.riri-launcher::before { content: none; }
.riri-launcher-icon { position: relative; width: 58px; height: 58px; flex-basis: 58px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.riri-mascot-stage { position: relative; display: block; width: 100%; height: 100%; overflow: visible; isolation: isolate; }
.riri-mascot-image { position: absolute; z-index: 1; bottom: 0; left: 50%; width: 125%; height: 125%; max-width: none; object-fit: contain; transform: translate(-50%, 36%) scale(.78); transform-origin: 50% 88%; animation: riri-box-pop 4.8s ease-in-out infinite; }
.riri-mascot-box { position: absolute; z-index: 2; bottom: 0; left: 16%; width: 68%; height: 43%; border: 2px solid #4e267f; border-radius: 4px; background: linear-gradient(135deg, #fff1a8, #ffde59); box-shadow: 0 2px 0 rgba(49, 17, 79, .25); }
.riri-mascot-box::before, .riri-mascot-box::after { position: absolute; top: -7px; width: 54%; height: 7px; border: 2px solid #4e267f; border-bottom: 0; border-radius: 4px 4px 0 0; background: #fff1a8; content: ""; }
.riri-mascot-box::before { left: -4px; transform: rotate(-18deg); transform-origin: right bottom; }
.riri-mascot-box::after { right: -4px; transform: rotate(18deg); transform-origin: left bottom; }
.riri-launcher-copy strong { font-size: 1rem; }
.riri-launcher-copy small { font-size: .66rem; }
.riri-avatar { width: 48px; height: 48px; flex-basis: 48px; overflow: hidden; padding: 2px; }
.riri-avatar-robot { width: 100%; height: 100%; object-fit: contain; }
.riri-panel { width: min(440px, calc(100vw - 32px)); height: min(720px, calc(100svh - 130px)); max-height: min(720px, calc(100svh - 130px)); }
.riri-messages { flex: 0 0 auto; max-height: min(210px, 28svh); }
.riri-faq-area { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.riri-faq-list { flex: 1 1 auto; min-height: 92px; max-height: none; }
@keyframes riri-box-pop {
  0%, 82%, 100% { transform: translate(-50%, 36%) scale(.78) rotate(0); }
  9% { transform: translate(-50%, -7%) scale(1.04) rotate(-5deg); }
  15% { transform: translate(-50%, -5%) scale(1) rotate(4deg); }
  20% { transform: translate(-50%, -5%) scale(1) rotate(-8deg); }
  25% { transform: translate(-50%, -5%) scale(1) rotate(8deg); }
  30% { transform: translate(-50%, -5%) scale(1) rotate(-6deg); }
  35%, 66% { transform: translate(-50%, -5%) scale(1) rotate(0); }
  75% { transform: translate(-50%, 8%) scale(.94) rotate(0); }
}
@media (max-width: 700px) {
  .riri-promo-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .riri-widget { right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); }
  .riri-launcher { width: 60px; min-height: 60px; max-width: 60px; justify-content: center; padding: 3px; border-radius: 50%; }
  .riri-launcher-icon { width: 50px; height: 50px; flex-basis: 50px; }
  .riri-launcher-copy { display: none; }
  .riri-launcher::after { position: absolute; top: 50%; right: calc(100% + 10px); padding: 7px 11px; border: 1px solid rgba(255, 255, 255, .75); border-radius: 999px; background: #4e267f; color: #ffde59; content: "Ask Riri"; font: 800 .72rem/1 "Outfit", sans-serif; white-space: nowrap; box-shadow: 0 5px 16px rgba(33, 13, 54, .24); transform: translateY(-50%); pointer-events: none; }
  .riri-launcher-ping { top: 0; right: 0; }
  .riri-panel { bottom: calc(92px + env(safe-area-inset-bottom)); height: min(700px, calc(100svh - 112px - env(safe-area-inset-bottom))); max-height: min(700px, calc(100svh - 112px - env(safe-area-inset-bottom))); }
  .riri-messages { max-height: min(190px, 25svh); }
  .riri-faq-list { min-height: 70px; }
}
@media (max-width: 380px) {
  .riri-panel { right: 7px; left: 7px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .riri-mascot-image { animation: none; transform: translate(-50%, -5%) scale(1); }
}
