/* ============================================
   Amigo Chat Widget — v4.2.2
   Lyla Health — Hero only, no corner widget
   ============================================ */

:root {
    --lyla-blue: #154C79;
    --lyla-blue-light: #eaf1f8;
    --lyla-blue-shadow: rgba(21, 76, 121, 0.35);
    --lyla-border: #e8e8ec;
    --lyla-text: #1a1a2e;
    --lyla-muted: #9090a0;
    --lyla-agent-bg: #f0f4f8;
    --lyla-bg: #f7f8fc;
}


/* =============================================
   HERO
   ============================================= */

.amigo-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    background: var(--lyla-bg);
    padding: 60px 24px 56px;
    box-sizing: border-box;
}

.amigo-hero-inner {
    width: 100%;
    max-width: 750px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Avatar cluster ---- */
.amigo-avatar-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.amigo-av {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 3px solid var(--lyla-bg);
    background: var(--lyla-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.amigo-av img {
	height: 100% !important;
}
.amigo-av + .amigo-av { margin-left: -12px; }
.amigo-av-main {
    width: 100px;
    height: 100px;
    z-index: 3;
}
.amigo-av:nth-child(2) { z-index: 2; }
.amigo-av:nth-child(3) { z-index: 1; }
.amigo-av-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ---- Heading ---- */
.amigo-hero-heading {
    font-size: 42px;
    font-weight: 400;
    color: var(--lyla-text);
    letter-spacing: -0.5px;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.12;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Body copy ---- */
.amigo-hero-copy {
    text-align: center;
    color: #4a4a6a;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.amigo-hero-copy strong {
    color: var(--lyla-text);
    font-weight: 500;
}

/* ---- Greeting state ---- */
.amigo-greeting-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
}

/* ---- Search bar ---- */
.amigo-search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--lyla-border);
    border-radius: 14px;
    padding: 15px 14px 15px 18px;
    gap: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 10px;
    box-sizing: border-box;
}
.amigo-search-bar:focus-within {
    border-color: var(--lyla-blue);
    box-shadow: 0 2px 18px rgba(21, 76, 121, 0.10);
}
.amigo-search-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}
.amigo-search-input {
    flex: 1;
    border: none !important;
    outline: none;
    font-size: 17px;
    color: var(--lyla-text);
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-width: 0;
}
.amigo-search-input::placeholder { color: var(--lyla-muted); }
.amigo-search-input:disabled { cursor: not-allowed; opacity: 0.6; }

.amigo-search-send {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--lyla-blue);
    border: none;
    border-radius: 9px;
    padding: 10px 18px;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    flex-shrink: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.amigo-search-send:hover:not(:disabled) { opacity: 0.88; }
.amigo-search-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.amigo-search-send svg {
    width: 15px;
    height: 15px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

/* ---- Privacy hint ---- */
.amigo-privacy {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--lyla-muted);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    align-self: flex-end;
    margin-bottom: 28px;
    padding-right: 2px;
}
.amigo-privacy svg {
    width: 12px;
    height: 12px;
    stroke: var(--lyla-muted);
    fill: none;
    stroke-width: 2;
    display: block;
}

/* ---- ToS block ---- */
.amigo-tos-wrap {
    width: 100%;
    margin-bottom: 0;
}
.amigo-tos-prompt {
    font-size: 17px;
    color: var(--lyla-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    margin: 0 0 14px;
    text-align: center;
}
.amigo-tos-prompt strong {
    font-weight: 600;
}
.amigo-tos-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 1.5px solid var(--lyla-border);
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    font-size: 15px;
    color: #4a4a6a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.55;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: border-color 0.15s;
}
.amigo-tos-label:hover {
    border-color: var(--lyla-blue);
}
.amigo-tos-check {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--lyla-blue);
    margin-top: 2px;
    cursor: pointer;
}
.amigo-tos-label a {
    color: var(--lyla-blue);
    text-decoration: underline;
}
.amigo-tos-label a:hover { opacity: 0.8; }


/* ---- Chat state ---- */
.amigo-chat-state {
    display: none;
    flex-direction: column;
    width: 100%;
}
.amigo-chat-state.active { display: flex; }

.amigo-chat-messages {
    max-height: 50vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
}
.amigo-msg {
    margin-bottom: 12px;
    padding: 13px 17px;
    border-radius: 16px;
    max-width: 78%;
    font-size: 16px;
    line-height: 1.55;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    word-wrap: break-word;
}
.amigo-msg.user {
    background: var(--lyla-blue);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.amigo-msg.agent {
    background: #fff;
    color: var(--lyla-text);
    border: 1.5px solid var(--lyla-border);
    border-bottom-left-radius: 4px;
}

.amigo-new-chat-row { display: none; padding: 4px 0 8px; }
.amigo-new-chat-row.visible { display: block; }
.amigo-new-chat {
    background: none;
    border: none;
    font-size: 13px;
    color: var(--lyla-blue);
    cursor: pointer;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.amigo-new-chat:hover { text-decoration: underline; }

.amigo-chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid var(--lyla-border);
    border-radius: 14px;
    padding: 12px 12px 12px 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.amigo-chat-form:focus-within { border-color: var(--lyla-blue); }
.amigo-chat-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 17px;
    color: var(--lyla-text);
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-width: 0;
}
.amigo-chat-input::placeholder { color: var(--lyla-muted); }
.amigo-chat-input:disabled { cursor: not-allowed; opacity: 0.6; }
.amigo-chat-send {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--lyla-blue);
    border: none;
    border-radius: 9px;
    padding: 10px 18px;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    flex-shrink: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.amigo-chat-send:hover:not(:disabled) { opacity: 0.88; }
.amigo-chat-send:disabled { opacity: 0.35; cursor: not-allowed; }
.amigo-chat-send svg {
    width: 15px;
    height: 15px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}


/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .amigo-hero { padding: 48px 20px 48px; }
    .amigo-hero-heading { font-size: 34px; }
    .amigo-hero-copy { font-size: 16px; }
    .amigo-search-input { font-size: 16px; }
    .amigo-chat-input { font-size: 16px; }
    .amigo-tos-prompt { font-size: 14px; }
    .amigo-tos-label { font-size: 14px; }
    .amigo-msg { font-size: 15px; }
}

@media (max-width: 480px) {
    .amigo-hero { padding: 40px 16px 40px; min-height: 100svh; }
    .amigo-hero-heading { font-size: 28px; margin-bottom: 16px; }
    .amigo-hero-copy { font-size: 15px; margin-bottom: 24px; }
    .amigo-av { width: 44px; height: 44px; }
    .amigo-av-main { width: 50px; height: 50px; }
    .amigo-search-bar { padding: 12px 12px 12px 14px; }
    .amigo-search-send { padding: 8px 13px; font-size: 14px; }
    .amigo-chat-form { padding: 10px 10px 10px 14px; }
    .amigo-chat-send { padding: 8px 13px; font-size: 14px; }
    .amigo-chat-messages { max-height: 45vh; }
    .amigo-tos-label { padding: 14px 14px; font-size: 13px; }
    .amigo-msg { max-width: 90%; }
}