/* ============================================================
   Royal Concrete — hero split layout + AI concierge widget.
   Self-contained (explicit colours) so it renders correctly even
   if other stylesheets are cached. Brand cyan #0099D6, navy #1A2B3C.
   ============================================================ */

/* ---- Split the hero: copy left, chat off to the right ---- */
.hero__inner--split {
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1.1fr 400px;   /* fixed chat column on the right */
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero__copy { text-align: left; }

/* ---- The concierge card ---- */
.hero__chat { position: relative; z-index: 3; justify-self: end; width: 100%; max-width: 400px; }

.rcs-chat {
  display: flex;
  flex-direction: column;
  height: clamp(420px, 56vh, 520px);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 24px 60px rgba(8,18,28,.45);
  overflow: hidden;
  font-family: 'Poppins', system-ui, sans-serif;
}

/* Header strip */
.rcs-chat__head {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1.1rem;
  background: #1A2B3C;
  color: #fff;
}
.rcs-chat__id { display: flex; align-items: center; gap: .65rem; }
.rcs-chat__id strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
}
.rcs-chat__id small {
  display: block;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #9DB7CC;
  margin-top: 1px;
}
.rcs-chat__id small a { color: #2cb6f0; text-decoration: none; font-weight: 600; }
.rcs-chat__id small a:hover { text-decoration: underline; }

.rcs-chat__dot {
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #0099D6;
  box-shadow: 0 0 0 0 rgba(0,153,214,.6);
  animation: rcsPulse 2.2s infinite;
}
@keyframes rcsPulse {
  70%  { box-shadow: 0 0 0 8px rgba(0,153,214,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,153,214,0); }
}

/* Message log */
.rcs-chat__log {
  flex: 1;
  min-height: 0;                 /* allow flex child to scroll */
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: #F4F6F9;
}
.rcs-chat__log::-webkit-scrollbar { width: 7px; }
.rcs-chat__log::-webkit-scrollbar-thumb { background: #cdd6e0; border-radius: 4px; }

.rcs-msg {
  max-width: 88%;
  padding: .6rem .85rem;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.rcs-msg--bot {
  align-self: flex-start;
  background: #ffffff;
  color: #2A3340;
  border: 1px solid #E2E8EF;
  border-bottom-left-radius: 4px;
}
.rcs-msg--user {
  align-self: flex-end;
  background: #0099D6;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.rcs-msg--typing { color: #6B7A8D; font-style: italic; }
.rcs-msg--typing span { display: inline-block; animation: rcsBlink 1.2s infinite; }
.rcs-msg--typing span:nth-child(2) { animation-delay: .2s; }
.rcs-msg--typing span:nth-child(3) { animation-delay: .4s; }
@keyframes rcsBlink { 0%,60%,100% { opacity: .25; } 30% { opacity: 1; } }

/* Input row */
.rcs-chat__form {
  display: flex;
  gap: .5rem;
  padding: .7rem;
  background: #fff;
  border-top: 1px solid #E2E8EF;
}
.rcs-chat__form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #E2E8EF;
  border-radius: 9px;
  padding: .65rem .8rem;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  color: #2A3340;
  background: #fff;
}
.rcs-chat__form input:focus {
  outline: none;
  border-color: #0099D6;
  box-shadow: 0 0 0 3px rgba(0,153,214,.15);
}
.rcs-chat__form button {
  flex-shrink: 0;
  width: 44px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  background: #0099D6;
  color: #fff;
  font-size: 1rem;
  transition: background .15s;
}
.rcs-chat__form button:hover { background: #0077AA; }
.rcs-chat__form button:disabled { opacity: .5; cursor: default; }

/* Disclaimer */
.rcs-chat__note {
  margin: 0;
  padding: .55rem 1rem .7rem;
  background: #fff;
  font-size: .68rem;
  color: #6B7A8D;
  line-height: 1.4;
  text-align: center;
  border-top: 1px solid #EEF1F5;
}

/* ---- Responsive: stack under the copy on tablet/mobile ---- */
@media (max-width: 980px) {
  .hero__inner--split { grid-template-columns: 1fr; }
  .hero__chat { justify-self: stretch; max-width: 520px; }
  .rcs-chat { height: clamp(380px, 50vh, 460px); }
}
