/* Costa AI assistant — standalone styles.
   Generated from style.css so self-contained pages (the case studies)
   can load the widget without pulling in the whole site stylesheet. */

:root {
    --red: #e8162a;
    --red-dim: rgba(232, 22, 42, .28);
    --red-soft: rgba(232, 22, 42, .08);
    --red-soft2: rgba(232, 22, 42, .14);
    --bg: #ffffff;
    --bg2: #f4f4f4;
    --bg2-rgb: 244, 244, 244;
    --card: #ffffff;
    --ink: #0a0a0a;
    --ink-dim: #666666;
    --line: rgba(10, 10, 10, .11);
    --nav-bg: rgba(255, 255, 255, .82);
    --shadow: 0 10px 30px rgba(10, 10, 10, .06);
  }

[data-theme="dark"] {
    --bg: #070707;
    --bg2: #0d0d0d;
    --bg2-rgb: 13, 13, 13;
    --card: #111113;
    --ink: #f0f0f0;
    --ink-dim: #8a8a8a;
    --line: rgba(240, 240, 240, .09);
    --nav-bg: rgba(7, 7, 7, .82);
    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  }

[data-theme="dark"] .theme-icon-light {
    display: none;
  }

[data-theme="dark"] .theme-icon-dark {
    display: block;
  }

[data-theme="dark"] .hero-bg-logo {
    opacity: .26;
    filter: saturate(1.2) brightness(.8);
  }

[data-theme="dark"] .showcase-bg-video {
    filter: saturate(1.1) brightness(.8);
  }

@media (prefers-reduced-motion: reduce) {
.float-wa,
    .costa-ai-launcher {
      animation: none;
    }
}

/* ── COSTA AI ASSISTANT ── */
  .costa-ai-launcher {
    position: fixed;
    bottom: 96px;
    inset-inline-end: 26px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(232, 22, 42, .4);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1);
    animation: fabBob 3.2s ease-in-out infinite .5s;
  }

.costa-ai-launcher::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(155deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 45%);
    pointer-events: none;
  }

.costa-ai-launcher:hover {
    transform: scale(1.08);
  }

.costa-ai-launcher svg {
    width: 24px;
    height: 24px;
    position: relative;
  }

.costa-ai-launcher .icon-chat {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
  }

.costa-ai-launcher .icon-close {
    display: none;
  }

.costa-ai-launcher.open .icon-chat {
    display: none;
  }

.costa-ai-launcher.open .icon-close {
    display: block;
  }

.costa-ai-panel {
    position: fixed;
    bottom: 166px;
    inset-inline-end: 26px;
    width: 368px;
    max-width: calc(100vw - 32px);
    height: 500px;
    max-height: calc(100vh - 210px);
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: scale(.94) translateY(14px);
    transform-origin: bottom right;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .4s cubic-bezier(.16, 1, .3, 1), opacity .3s ease, visibility .4s;
  }

[dir="rtl"] .costa-ai-panel {
    transform-origin: bottom left;
  }

.costa-ai-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

.costa-ai-head {
    background: var(--red);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }

.costa-ai-head-info {
    display: flex;
    align-items: center;
    gap: 12px;
  }

.costa-ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, .18);
    flex-shrink: 0;
  }

.costa-ai-head-info b {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 17px;
    letter-spacing: .02em;
  }

[lang="ar"] .costa-ai-head-info b {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 15px;
  }

.costa-ai-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    opacity: .9;
    margin-top: 2px;
  }

.costa-ai-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3ddc84;
    display: inline-block;
    animation: blink 1.8s ease-in-out infinite;
  }

.costa-ai-close {
    color: #fff;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .85;
    flex-shrink: 0;
    transition: opacity .2s;
  }

.costa-ai-close:hover {
    opacity: 1;
  }

.costa-ai-close svg {
    width: 18px;
    height: 18px;
  }

.costa-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg2);
  }

.costa-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 18px 14px;
    flex-shrink: 0;
    background: var(--bg2);
  }

.costa-ai-chip {
    font-size: 12px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    border-radius: 20px;
    transition: border-color .2s, color .2s, transform .2s;
  }

.costa-ai-chip:hover {
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-2px);
  }

.costa-ai-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    background: var(--bg);
    flex-shrink: 0;
  }

.costa-ai-input input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--ink);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
  }

.costa-ai-input input::placeholder {
    color: var(--ink-dim);
  }

.costa-ai-input button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .2s;
  }

.costa-ai-input button:hover {
    transform: scale(1.08);
  }

.costa-ai-input button svg {
    width: 15px;
    height: 15px;
  }

@media (max-width: 480px) {
.costa-ai-panel {
      width: calc(100vw - 24px);
      height: min(72vh, 540px);
    }
}

/* assistant answers can point at the page that holds the detail */
.costa-ai-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--red);
  border-bottom: 1px solid var(--red-dim);
}

.costa-ai-link:hover {
  border-bottom-color: var(--red);
}

/* dark, borderless surfaces (chat chips, tags) need a lighter ring so it
   doesn't disappear against the same-color background on click */
.costa-ai-chip:focus-visible,
.as-seg button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
