/* chat-widget.css - styles for the "Ask us" chat (js/chat-widget.js), self-contained so it looks the same on the
   website and inside Moodle. Colors are Red River Valley CDL's own theme. */
#rrv-chat-btn, #rrv-chat, #rrv-chat * { box-sizing: border-box; }
#rrv-chat-btn { position: fixed; right: 18px; bottom: 18px; z-index: 1050; background: #4682b4; color: #fff; border: 0; border-radius: 999px; padding: 14px 18px; font: 700 16px/1.2 "Lato", Arial, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; display: flex; gap: 8px; align-items: center; }
#rrv-chat-btn:hover { background: #35668f; }
/* Moodle keeps its own help button in the bottom right corner, so the chat button sits above it there. */
body[class*="pagelayout-"] #rrv-chat-btn { bottom: 84px; }
#rrv-chat { position: fixed; right: 18px; bottom: 18px; z-index: 1051; width: min(390px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px)); background: #fff; border-radius: 16px; box-shadow: 0 16px 50px rgba(0,0,0,.3); display: none; flex-direction: column; overflow: hidden; border: 1px solid #dbdbdb; font: 400 15px/1.45 "Lato", Arial, sans-serif; color: #1b1b1b; text-align: left; }
#rrv-chat.open { display: flex; }
@media (max-width: 700px) { #rrv-chat-btn { right: 12px; padding: 12px 14px; } #rrv-chat { right: 12px; bottom: 12px; } }
#rrv-chat .ch-head { background: #253427; color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
#rrv-chat .ch-head img { width: 38px; height: 38px; border-radius: 50%; background: #fff; }
#rrv-chat .ch-head b { display: block; font-family: "Poppins", Arial, sans-serif; font-weight: 600; }
#rrv-chat .ch-head small { color: #cfe6d1; font-size: 12px; }
#rrv-chat .ch-head button { margin-left: auto; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; line-height: 1; padding: 0 4px; }
#rrv-chat .ch-log { flex: 1; overflow-y: auto; padding: 14px; background: #f4fbf5; display: flex; flex-direction: column; gap: 10px; }
#rrv-chat .ch-msg { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
#rrv-chat .ch-msg.bot { background: #fff; border: 1px solid #dbdbdb; align-self: flex-start; border-bottom-left-radius: 4px; }
#rrv-chat .ch-msg.me { background: #4682b4; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
#rrv-chat .ch-msg a { color: inherit; font-weight: 700; text-decoration: underline; }
#rrv-chat .ch-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: #f4fbf5; }
#rrv-chat .ch-quick button { background: #fff; border: 1px solid #dbdbdb; border-radius: 999px; padding: 6px 10px; font: 600 13px "Lato", Arial, sans-serif; cursor: pointer; color: #1b1b1b; }
#rrv-chat .ch-quick button:hover { border-color: #58805c; }
#rrv-chat .ch-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #dbdbdb; background: #fff; margin: 0; }
#rrv-chat .ch-form input { flex: 1; padding: 10px 12px; border: 1px solid #cfc3b3; border-radius: 8px; font: inherit; min-width: 0; }
#rrv-chat .ch-form button { background: #b4eab9; color: #1b1b1b; border: 0; border-radius: 8px; padding: 0 14px; font-weight: 800; cursor: pointer; }
#rrv-chat .ch-typing { font-style: italic; color: #595959; }
@media print { #rrv-chat-btn, #rrv-chat { display: none !important; } }


/* ---- Inviting chat with the school logo (2026-10-19) ---- */
#rrv-chat-btn { display: inline-flex; align-items: center; gap: 10px; padding: 7px 18px 7px 7px; background: linear-gradient(135deg, #253427, #4682b4);
  box-shadow: 0 10px 28px rgba(37, 52, 39, .35); transition: transform .25s ease, box-shadow .25s ease; animation: ch-ring 3s ease-out 2s 4; }
#rrv-chat-btn:hover { background: linear-gradient(135deg, #253427, #35668f); transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 34px rgba(37, 52, 39, .45); }
@keyframes ch-ring { 0% { box-shadow: 0 10px 28px rgba(37, 52, 39, .35), 0 0 0 0 rgba(180, 234, 185, .7); } 70%, 100% { box-shadow: 0 10px 28px rgba(37, 52, 39, .35), 0 0 0 16px rgba(180, 234, 185, 0); } }
.ch-av { position: relative; flex: none; display: block; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #b4eab9; }
.ch-av img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.ch-av.big { width: 52px; height: 52px; box-shadow: 0 0 0 3px rgba(180, 234, 185, .9), 0 6px 16px rgba(0, 0, 0, .3); }
.ch-dot { position: absolute; right: -1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #3ddc84; border: 2px solid #fff; }
.ch-btn-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.ch-btn-txt b { font: 800 16px "Lato", Arial, sans-serif; }
.ch-btn-txt small { font: 600 11px "Lato", Arial, sans-serif; color: #cfe6d1; }
#rrv-chat-hello { position: fixed; right: 18px; bottom: 88px; z-index: 1050; width: min(290px, calc(100vw - 36px)); padding: 14px 32px 14px 16px; border-radius: 16px 16px 4px 16px;
  background: #fff; color: #1b1b1b; font: 15px/1.45 "Lato", Arial, sans-serif; box-shadow: 0 14px 40px rgba(0, 0, 0, .22); border: 1px solid rgba(88, 128, 92, .25);
  cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.95); transform-origin: bottom right; transition: opacity .35s ease, transform .4s cubic-bezier(.3, 1.4, .5, 1), visibility 0s .4s; }
#rrv-chat-hello.show { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .4s cubic-bezier(.3, 1.4, .5, 1); }
#rrv-chat-hello b { display: block; font-family: "Poppins", Arial, sans-serif; color: #253427; margin-bottom: 2px; }
#rrv-chat-hello .ch-hello-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 20px; line-height: 1; color: #595959; cursor: pointer; }
body[class*="pagelayout-"] #rrv-chat-hello { bottom: 154px; }
#rrv-chat { border-radius: 22px; transform-origin: bottom right; animation: ch-pop .35s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes ch-pop { from { opacity: 0; transform: translateY(20px) scale(.92); } to { opacity: 1; transform: none; } }
#rrv-chat .ch-head { gap: 12px; padding: 14px 16px; background: radial-gradient(circle at 90% 0%, rgba(180, 234, 185, .3), transparent 55%), linear-gradient(120deg, #253427, #2f4532 55%, #35668f); }
#rrv-chat .ch-head b { font-size: 17px; }
#rrv-chat .ch-head small { display: flex; align-items: center; gap: 6px; }
#rrv-chat .ch-live { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); animation: ch-live 2s infinite; }
@keyframes ch-live { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); } 70%, 100% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } }
#rrv-chat .ch-head button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .12); font-size: 22px; transition: background .2s ease, transform .2s ease; }
#rrv-chat .ch-head button:hover { background: rgba(255, 255, 255, .25); transform: rotate(90deg); }
#rrv-chat .ch-log { background: linear-gradient(180deg, #eef8ef, #f8fcf8); gap: 12px; padding: 16px 14px; }
#rrv-chat .ch-msg { animation: ch-msg .3s ease both; box-shadow: 0 3px 10px rgba(37, 52, 39, .06); border-radius: 16px; }
@keyframes ch-msg { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#rrv-chat .ch-msg.bot { position: relative; margin-left: 38px; border-color: rgba(88, 128, 92, .2); border-bottom-left-radius: 4px; }
#rrv-chat .ch-msg.bot::before { content: ""; position: absolute; left: -38px; bottom: 0; width: 30px; height: 30px; border-radius: 50%; background: #fff var(--rrv-logo) center / cover no-repeat; box-shadow: 0 0 0 2px #b4eab9; }
#rrv-chat .ch-msg.me { background: linear-gradient(135deg, #4682b4, #35668f); }
#rrv-chat .ch-dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
#rrv-chat .ch-dots i { width: 8px; height: 8px; border-radius: 50%; background: #58805c; animation: ch-bounce 1.2s infinite ease-in-out; }
#rrv-chat .ch-dots i:nth-child(2) { animation-delay: .15s; } #rrv-chat .ch-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ch-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-6px); opacity: 1; } }
#rrv-chat .ch-quick { background: #f8fcf8; padding: 10px 12px 2px; }
#rrv-chat .ch-quick button { border: 2px solid rgba(88, 128, 92, .3); padding: 7px 12px; color: #253427; transition: background .2s ease, transform .2s ease, border-color .2s ease; }
#rrv-chat .ch-quick button:hover { background: #b4eab9; border-color: #b4eab9; transform: translateY(-2px); }
#rrv-chat .ch-form { gap: 10px; padding: 12px; }
#rrv-chat .ch-form input { border: 2px solid rgba(88, 128, 92, .25); border-radius: 999px; padding: 11px 16px; }
#rrv-chat .ch-form input:focus { outline: none; border-color: #58805c; box-shadow: 0 0 0 3px rgba(88, 128, 92, .18); }
#rrv-chat .ch-form button { width: 46px; height: 46px; flex: none; padding: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #58805c, #253427); color: #fff; transition: transform .2s ease; }
#rrv-chat .ch-form button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#rrv-chat .ch-form button:hover { transform: scale(1.08) rotate(-10deg); }
@media (max-width: 700px) { #rrv-chat-btn { padding: 6px 14px 6px 6px; } .ch-btn-txt small { display: none; } #rrv-chat-hello { bottom: 132px; } }
@media (prefers-reduced-motion: reduce) { #rrv-chat-btn, #rrv-chat, #rrv-chat .ch-msg, #rrv-chat .ch-live, #rrv-chat .ch-dots i { animation: none; } }
