/* Adult social care page. Every rule is under an .asc- class, so nothing
   reaches the shared nav, footer or contact form. */

.asc-prose {
  max-width: 760px;
}

.asc-prose h2 {
  margin-bottom: 20px;
}

.asc-prose p {
  margin-bottom: 18px;
  line-height: 1.8;
}

.asc-prose p:last-child {
  margin-bottom: 0;
}

.asc-lead {
  font-size: 19px;
  color: var(--ink);
}

/* ==================== WIGAN ==================== */

/* Six facts split evenly as 6, 3 or 2 across. auto-fit left one orphaned at
   tablet width. */
.asc-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin-top: 40px;
}

@media (width >= 700px) {
  .asc-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width >= 1180px) {
  .asc-facts {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.asc-fact {
  padding: 22px clamp(14px, 3vw, 20px) 24px;
  background: #fff;
}

.asc-fact__num {
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.asc-fact__label {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Flex so a third quote that wraps takes the full row. */
.asc-quotes {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
}

.asc-quotes .quote-card {
  flex: 1 1 280px;
  background: #fff;
}

.asc-after {
  margin-top: 32px;
  font-weight: 500;
}

/* ==================== PRODUCTS ==================== */
.asc-cards {
  margin-top: 48px;
}

.asc-cards .card-offer {
  padding: 28px;
}

.asc-cards h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

.asc-cards .card-offer p {
  font-size: 15px;
}

.asc-cards .card-offer .asc-card__for {
  flex: none;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.asc-cards .card-offer .asc-card__status {
  flex: none;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

.asc-cards .card-offer__link {
  margin-top: 16px;
}

/* Maturity colours match the other department pages. */
.asc-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 4px;
}

.asc-tag--live {
  background: rgb(74 222 128 / 15%);
  color: #166534;
}

.asc-tag--early {
  background: rgb(245 158 11 / 15%);
  color: #854d0e;
}

.asc-tag--dev {
  background: rgb(65 182 230 / 15%);
  color: #0369a1;
}

/* ==================== VIRTUAL ASSISTANT ==================== */
.asc-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 56px;
  align-items: start;
}

.asc-checks li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.asc-checks li:last-child {
  border-bottom: 1px solid var(--border);
}

.asc-checks strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--ink);
}

.asc-checks__tick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
}

/* ==================== CHAT DEMO ==================== */
.asc-chat {
  display: flex;
  flex-direction: column;
  max-width: 900px;

  /* Never under 560px, so a reply stays readable on a phone. */
  height: min(680px, max(78vh, 560px));
  margin: 48px auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-hover);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}

.asc-chat [hidden] {
  display: none !important;
}

.asc-chat button {
  font: inherit;
  cursor: pointer;
}

.asc-chat button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.asc-chat__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
}

.asc-chat__head svg {
  flex: none;
}

.asc-chat__title {
  flex: 1;
  font-size: clamp(16px, 4.5vw, 19px);
  line-height: 1.25;
  color: #fff;
}

.asc-chat__reset {
  display: flex;
  padding: 6px;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 6px;
  background: none;
  color: #fff;
}

.asc-chat__reset:hover {
  background: rgb(255 255 255 / 14%);
}

.asc-chat .asc-chat__reset:focus-visible {
  outline-color: #fff;
}

.asc-chat__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px clamp(16px, 4vw, 28px) 18px;
  overflow-y: auto;
}

.asc-chat__body:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.asc-chat__who {
  margin: 0 2px 6px;
  font-size: 16px;
  font-weight: 700;
}

.asc-chat__time {
  margin: 6px 2px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.asc-chat__bubble {
  max-width: 88%;
  padding: 16px 20px;
  border-radius: 6px;
  background: var(--cool-grey);
}

.asc-chat__bubble p,
.asc-chat__bubble li {
  margin-bottom: 8px;
}

.asc-chat__bubble ol,
.asc-chat__bubble ul {
  margin: 6px 0 10px;
  padding-left: 22px;
}

.asc-chat__bubble ol {
  list-style: decimal;
}

.asc-chat__bubble ul {
  list-style: disc;
}

.asc-chat__bubble > :last-child,
.asc-chat__bubble li:last-child {
  margin-bottom: 0;
}

.asc-chat__link {
  color: var(--blue);
  text-decoration: underline;
}

.asc-chat__ext {
  margin-left: 4px;
}

.asc-chat__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  margin-top: 18px;
}

/* #7e8799 is the control border the annual review demo uses, 3.6:1 on white. */
.asc-chat__option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #7e8799;
  border-radius: 6px;
  background: #fff;
  text-align: left;
}

.asc-chat__option:hover {
  border-color: var(--blue);
  background: var(--cool-grey);
}

.asc-chat__option-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.asc-chat__option-desc {
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-muted);
}

.asc-chat__msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
  animation: asc-slide-in 0.4s var(--ease-out) both;
}

.asc-chat__msg--user {
  align-items: flex-end;
}

.asc-chat__msg--user .asc-chat__bubble {
  background: var(--blue);
  color: #fff;
}

.asc-chat__typing {
  margin-bottom: 16px;
}

.asc-chat__dots {
  display: inline-flex;
  gap: 7px;
  padding: 15px 20px;
  border-radius: 18px;
  background: var(--cool-grey);
}

.asc-chat__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: asc-blink 1.3s infinite both;
}

.asc-chat__dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.asc-chat__dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.asc-chat__bar {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--cool-grey);
}

.asc-chat__next {
  flex: 1;
  min-width: min(100%, 220px);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.asc-chat__next-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.asc-chat__next-text {
  font-size: 16px;
  line-height: 1.4;
}

.asc-chat__done-text {
  flex: 1;
  min-width: min(100%, 200px);
  color: var(--text);
}

.asc-chat__btn {
  flex: none;
  padding: 12px 24px;
  border: 2px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.asc-chat__btn:hover {
  border-color: var(--blue-hover);
  background: var(--blue-hover);
}

.asc-chat__btn--ghost {
  background: #fff;
  color: var(--blue);
}

.asc-chat__btn--ghost:hover {
  background: var(--cool-grey);
  color: var(--blue);
}

/* A picture of the input, not a control. The resident's message types in here. */
.asc-chat__input {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 12px 18px 12px 22px;
  border-top: 1px solid var(--border);
  color: var(--blue);
}

.asc-chat__draft {
  flex: 1;
}

.asc-chat__draft:empty::before {
  content: attr(data-placeholder);
  font-style: italic;
  color: var(--text-muted);
}

.asc-chat__input svg {
  flex: none;
  opacity: 0.5;
}

.asc-chat-note {
  max-width: 900px;
  margin: 12px auto 0;
  font-size: 14px;
  color: var(--text-muted);
}

@keyframes asc-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes asc-blink {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .asc-chat__msg,
  .asc-chat__dots span {
    animation: none;
  }
}
