/* The website chat widget (moved out of views/layouts/layout.hbs, 2026-10-14, so browsers cache it). */
/* A tech is writing. Same bubble shape as a reply, so it reads as one arriving. */
.orada-typing { display: inline-flex !important; align-items: center; gap: 4px; }
.orada-typing .od { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; }
@media (prefers-reduced-motion: no-preference) {
  .orada-typing .od { animation: odb 1.2s infinite; }
  .orada-typing .od:nth-child(2) { animation-delay: .2s; }
  .orada-typing .od:nth-child(3) { animation-delay: .4s; }
  @keyframes odb { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: .9; transform: translateY(-2px); } }
}

  #orada-chat-btn {
    position: fixed; bottom: 28px; right: 28px;
    width: 62px; height: 62px; border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border: none; cursor: pointer;
    box-shadow: 0 4px 20px rgba(26,115,232,0.5);
    z-index: 9999; display: flex;
    align-items: center; justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  #orada-chat-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(26,115,232,0.65); }
/* Lupito on the button (2026-10-14): white, ringed, him standing in it; blue with the X once the chat is open. */
/* A blue ring round him, with a soft pulse going out from it, in place of the old always-on red dot (2026-10-14:
   it meant nothing, and read as an unread message). Drawn with box-shadow, which the button's overflow does not clip. */
#orada-chat-btn { background: #ffffff; box-shadow: 0 6px 22px rgba(13,35,64,0.24), 0 0 0 3px #ffffff, 0 0 0 5px #1a73e8, 0 0 0 5px rgba(26,115,232,0); }
#orada-chat-btn:hover { transform: scale(1.06); }
@media (prefers-reduced-motion: no-preference) {
  #orada-chat-btn:not(.open) { animation: lpRing 2.8s ease-out infinite; }
  @keyframes lpRing {
    0% { box-shadow: 0 6px 22px rgba(13,35,64,0.24), 0 0 0 3px #ffffff, 0 0 0 5px #1a73e8, 0 0 0 5px rgba(26,115,232,0.45); }
    70%, 100% { box-shadow: 0 6px 22px rgba(13,35,64,0.24), 0 0 0 3px #ffffff, 0 0 0 5px #1a73e8, 0 0 0 17px rgba(26,115,232,0); }
  }
}
#orada-chat-btn.open { background: linear-gradient(135deg, #1a73e8, #0d47a1); box-shadow: 0 4px 20px rgba(26,115,232,0.5); }
/* His speech bubble, to the left of the button, its tail pointing at him (2026-10-14). */
.lp-say {
  position: fixed; right: 102px; bottom: 36px; z-index: 9998; display: flex; align-items: flex-start; max-width: 220px;
  background: #ffffff; border-radius: 16px; box-shadow: 0 10px 30px rgba(13,35,64,.18), 0 0 0 1px #e1e8f2;
  opacity: 0; transform: translateX(8px) scale(.96); transform-origin: right center; transition: opacity .2s, transform .2s;
}
.lp-say.is-in { opacity: 1; transform: none; }
.lp-say::after {
  content: ''; position: absolute; right: -7px; bottom: 16px; width: 14px; height: 14px; background: #ffffff;
  transform: rotate(45deg); box-shadow: 1px -1px 0 #e1e8f2; border-radius: 0 3px 0 0;
}
.lp-sayText {
  position: relative; z-index: 1; flex: 1; min-width: 0; padding: 11px 6px 11px 14px; border: 0; background: none; cursor: pointer;
  text-align: left; font-family: sofia-pro, 'Inter', sans-serif; font-size: 15px; line-height: 1.35; color: #0d2340;
}
.lp-sayX {
  position: relative; z-index: 1; flex-shrink: 0; width: 30px; height: 30px; margin: 4px 4px 0 0; border: 0; border-radius: 8px;
  background: none; color: #8a97ab; font-size: 18px; line-height: 1; cursor: pointer;
}
.lp-sayX:hover { background: #eef3fb; color: #0d2340; }
@media (prefers-reduced-motion: reduce) { .lp-say { transition: none; transform: none; } }
@media (max-width: 767px) {
  .lp-say { right: 80px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); max-width: min(210px, calc(100vw - 100px)); }
}
/* His lens (the drawing's 0,0, at 50% across and 45% down its 160 x 200 box) on the button's centre, whatever size the
   button is (56px on a phone); the handle runs off the bottom. */
#orada-chat-btn { overflow: hidden; }
#orada-chat-btn svg.lupito { position: absolute; width: 70px; height: 88px; left: calc(50% - 35px); top: calc(50% - 39.6px); margin: 0; fill: initial; }
  #orada-chat-btn svg { width: 28px; height: 28px; fill: white; }
  #orada-chat-btn .close-icon { display: none; }
  #orada-chat-btn.open .chat-icon { display: none; }
  #orada-chat-btn.open .close-icon { display: block; }
  /* (The red dot that sat here went 2026-10-14: the ring above does its job.) */
  #orada-chat-window {
    position: fixed; bottom: 104px; right: 28px;
    width: 360px; max-height: 560px; background: #ffffff;
    border-radius: 18px; box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    z-index: 9998; display: none; flex-direction: column;
    overflow: hidden; font-family: 'Inter', sans-serif;
    animation: slideUp 0.25s ease;
  }
  #orada-chat-window.open { display: flex; }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .chat-header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    padding: 16px 18px; display: flex; align-items: center; gap: 12px;
  }
  .chat-header-avatar .lupito { position: absolute; width: 46px; height: 57.5px; left: calc(50% - 23px); top: calc(50% - 25.9px); }
  .chat-header-avatar {
    position: relative; overflow: hidden;
    width: 40px; height: 40px; background: #ffffff;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 20px; flex-shrink: 0;
  }
  .chat-header-info h3 {
    font-family: 'Rajdhani', sans-serif; color: white;
    font-size: 16px; font-weight: 700; margin: 0; letter-spacing: 0.5px;
  }
  .chat-header-info p { color: rgba(255,255,255,0.75); font-size: 12px; margin: 2px 0 0 0; }
  .chat-header-status {
    width: 8px; height: 8px; background: #4cff91;
    border-radius: 50%; margin-left: auto; flex-shrink: 0;
    box-shadow: 0 0 6px #4cff91;
  }
  .chat-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 10px; background: #f8f9fb;
  }
  .chat-messages::-webkit-scrollbar { width: 4px; }
  .chat-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
  .msg {
    max-width: 82%; padding: 10px 14px; border-radius: 14px;
    font-size: 13.5px; line-height: 1.6; animation: fadeIn 0.2s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .msg.bot {
    background: white; color: #1a1a2e; border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); align-self: flex-start;
  }
  .msg.user {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white; border-bottom-right-radius: 4px; align-self: flex-end;
  }
  .msg.typing { background: white; align-self: flex-start; padding: 12px 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
  .typing-dots { display: flex; gap: 4px; align-items: center; }
  .typing-dots span {
    width: 7px; height: 7px; background: #1a73e8;
    border-radius: 50%; animation: bounce 1.2s infinite;
  }
  .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
  .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
  }
  .chat-disclaimer {
    font-size: 11px; color: #999; text-align: center;
    padding: 6px 16px 0; background: #f8f9fb; font-style: italic;
  }
  /* "How's best to reach you?" — shown when nobody came to the chat. Buttons
     rather than a text box: we already hold their number and their email, so
     the only thing left to ask is which one, and that should be one tap. */
  .chat-cbwrap { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; justify-content: center; }
  .chat-cbbtn {
    border: 1.5px solid #cdd8ea; background: #fff; color: #1a1a2e;
    border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600;
    font-family: 'Inter', sans-serif; cursor: pointer; transition: all .15s;
  }
  .chat-cbbtn:hover:not(:disabled) { border-color: #2f6df6; color: #2f6df6; }
  .chat-cbbtn:disabled { opacity: .45; cursor: default; }
  .chat-cbbtn.chosen { opacity: 1; background: #2f6df6; border-color: #2f6df6; color: #fff; }
  .chat-input-area {
    padding: 12px 14px; background: white;
    border-top: 1px solid #eee; display: flex; gap: 8px; align-items: flex-end;
  }
  .chat-input-area textarea {
    flex: 1; border: 1.5px solid #e0e6f0; border-radius: 12px;
    padding: 10px 13px; font-size: 13px; font-family: 'Inter', sans-serif;
    resize: none; outline: none; max-height: 100px; line-height: 1.5;
    color: #1a1a2e; transition: border-color 0.2s;
  }
  .chat-input-area textarea:focus { border-color: #1a73e8; }
  .chat-input-area textarea::placeholder { color: #aab; }
  /* Intro card. Same blue as the header and the send button so it reads as
     part of the widget rather than a form dropped on top of it. */
  .chat-intro { padding: 20px 18px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; flex: 1; }
  .chat-intro[hidden] { display: none; }
  .chat-intro h4 { margin: 0; font-size: 16px; color: #1a2b47; font-weight: 700; }
  .chat-intro p { margin: 0 0 4px; font-size: 13.5px; color: #5a6b85; line-height: 1.5; }
  .ci-row { display: flex; gap: 8px; }
  .ci-row input { flex: 1; min-width: 0; }
  .chat-intro input {
    width: 100%; box-sizing: border-box; padding: 11px 13px; font-size: 15px; font-family: inherit;
    border: 1px solid #d6e0ee; border-radius: 10px; background: #fff; color: #1a2b47;
  }
  .chat-intro input:focus { outline: 2px solid #1a73e8; outline-offset: -1px; border-color: #1a73e8; }
  .ci-err { color: #c0392b; font-size: 12.5px; min-height: 15px; }
  .ci-go {
    padding: 12px; border: none; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, #1a73e8, #0d47a1); color: #fff;
    font-size: 15px; font-weight: 700; font-family: inherit;
  }
  .ci-go:hover { filter: brightness(1.07); }
  /* A real way out, worded plainly — a form in front of a chat costs you the
     person who only wanted to ask if you are open. */
  .ci-note { margin: 2px 0 0; font-size: 11.5px; color: #8a97ab; line-height: 1.45; text-align: center; }
  .send-btn {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: transform 0.15s;
  }
  .send-btn:hover { transform: scale(1.08); }
  .send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
  .send-btn svg { width: 18px; height: 18px; fill: white; }
  .chat-human-btn { display: block; width: calc(100% - 28px); margin: 0 14px 8px; padding: 7px 12px; background: #f1f5f9; border: 1px solid #e2e8f0; color: #334155; border-radius: 10px; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; text-align: center; }
  .chat-human-btn:hover { background: #e2e8f0; }
  .chat-human-btn.pinged { background: #ecfdf5; border-color: #86efac; color: #047857; cursor: default; }
  @media (max-width: 480px) {
    #orada-chat-window { width: calc(100vw - 24px); right: 12px; bottom: 90px; }
    #orada-chat-btn { right: 16px; bottom: 16px; }
  }

