/* Outbox · asistentul site-ului. Foloseste tokenele din outbox.css, fara culori noi. */

.chat-lansare {
    position: fixed; right: 20px; bottom: 24px; z-index: 300;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 20px 13px 16px; border: 0; cursor: pointer;
    font-family: var(--font-b); font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
    color: #fff; background: var(--navy); border-radius: var(--r-full);
    box-shadow: var(--shadow-l);
    transition: transform .35s var(--out), background .25s ease, box-shadow .35s var(--out);
}
.chat-lansare:hover { background: var(--navy-2); transform: translateY(-2px); }
.chat-lansare:active { transform: translateY(0) scale(.98); }
.chat-lansare:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.chat-lansare svg { width: 20px; height: 20px; flex: none; }
.chat-lansare .chat-punct {
    width: 7px; height: 7px; border-radius: var(--r-full); background: #4ADE80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .2);
}
.chat-lansare[hidden] { display: none; }

/* deasupra barei fixe de contact de pe mobil */
@media (max-width: 640px) {
    .chat-lansare { right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 11px 17px 11px 14px; font-size: 13.5px; }
}

.chat-fereastra {
    position: fixed; right: 20px; bottom: 24px; z-index: 301;
    width: min(392px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px));
    display: none; flex-direction: column; overflow: hidden;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-l);
    font-family: var(--font-b); color: var(--text-1);
}
.chat-fereastra.deschis { display: flex; animation: chat-intra .4s var(--spring) both; }
@keyframes chat-intra { from { opacity: 0; transform: translateY(14px) scale(.97); } }

@media (max-width: 640px) {
    .chat-fereastra {
        right: 0; left: 0; bottom: 0; width: 100%;
        max-height: 88vh; height: 88dvh; border-radius: var(--r-md) var(--r-md) 0 0;
        border-left: 0; border-right: 0; border-bottom: 0;
    }
}

/* ─── antet ─── */

.chat-antet {
    display: flex; align-items: center; gap: 11px; flex: none;
    padding: 13px 12px 13px 18px; background: var(--navy); color: #fff;
}
.chat-antet b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.chat-antet .chat-insigna {
    width: 34px; height: 34px; flex: none; display: grid; place-items: center;
    border-radius: var(--r-full); background: rgba(255,255,255,.12);
}
.chat-antet .chat-insigna svg { width: 18px; height: 18px; }
.chat-actiuni { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.chat-actiune {
    width: 32px; height: 32px; flex: none; display: grid; place-items: center;
    border: 0; border-radius: var(--r-full); cursor: pointer;
    background: transparent; color: rgba(255,255,255,.75);
    transition: background .2s ease, color .2s ease;
}
.chat-actiune:hover { background: rgba(255,255,255,.14); color: #fff; }
.chat-actiune:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.chat-actiune svg { width: 16px; height: 16px; }
.chat-actiune[aria-expanded="true"] { background: rgba(255,255,255,.2); color: #fff; }

/* ─── conversatii salvate ─── */

.chat-panou {
    flex: none; max-height: 282px; overflow-y: auto; padding: 8px;
    background: var(--bg); border-bottom: 1px solid var(--border);
}
.chat-panou[hidden] { display: none; }
.chat-gol { padding: 18px 10px; text-align: center; font-size: 13.5px; color: var(--text-3); }
.chat-rand { display: flex; align-items: stretch; gap: 2px; border-radius: var(--r-sm); }
.chat-rand:hover { background: var(--bg2); }
.chat-rand.activ { background: var(--blue-l); }
.chat-deschide {
    flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; cursor: pointer;
    padding: 10px 6px 10px 12px; border: 0; background: transparent; text-align: left;
    font-family: var(--font-b);
}
.chat-titlu {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 13.5px; font-weight: 600; color: var(--text-1);
}
.chat-data { flex: none; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.chat-sterge-rand {
    width: 34px; flex: none; display: grid; place-items: center; cursor: pointer;
    border: 0; background: transparent; color: var(--text-3); border-radius: var(--r-sm);
    transition: color .2s ease;
}
.chat-sterge-rand:hover { color: #DC2626; }
.chat-sterge-rand svg { width: 13px; height: 13px; }
.chat-sterge-tot {
    display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
    margin-top: 6px; padding: 10px; cursor: pointer; font-family: var(--font-b);
    font-size: 12.5px; font-weight: 600; color: var(--text-3);
    border: 0; border-top: 1px solid var(--border); background: transparent;
    transition: color .2s ease;
}
.chat-sterge-tot:hover { color: #DC2626; }
.chat-sterge-tot svg { width: 14px; height: 14px; }

/* ─── firul conversatiei ─── */

.chat-fir {
    flex: 1; overflow-y: auto; overscroll-behavior: contain;
    padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 12px;
    background: var(--bg2);
}
.chat-mesaj { max-width: 86%; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.chat-mesaj.bot {
    align-self: flex-start; padding: 12px 15px; color: var(--text-1);
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r-md) var(--r-md) var(--r-md) 6px; box-shadow: var(--shadow-s);
}
.chat-mesaj.om {
    align-self: flex-end; padding: 12px 15px; color: #fff; background: var(--blue);
    border-radius: var(--r-md) var(--r-md) 6px var(--r-md);
}
.chat-mesaj strong { font-weight: 700; color: var(--navy); }
.chat-mesaj.om strong { color: #fff; }

.chat-scrie { display: flex; gap: 5px; align-self: flex-start; padding: 14px 16px; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--r-md) var(--r-md) var(--r-md) 6px; }
.chat-scrie i { width: 6px; height: 6px; border-radius: var(--r-full); background: var(--text-3);
    animation: chat-puls 1.3s infinite ease-in-out; }
.chat-scrie i:nth-child(2) { animation-delay: .18s; }
.chat-scrie i:nth-child(3) { animation-delay: .36s; }
@keyframes chat-puls { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ─── lasa-ti contactul ─── */

.chat-cta {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 9px 14px; font-family: var(--font-b); font-size: 12.5px; font-weight: 600;
    color: var(--blue); background: var(--bg); border: 1px dashed var(--blue);
    border-radius: var(--r-full); transition: background .2s ease, color .2s ease;
}
.chat-cta:hover { background: var(--blue); color: #fff; }
.chat-cta svg { width: 14px; height: 14px; }

.chat-contact {
    align-self: stretch; padding: 14px 15px; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-s);
}
.chat-contact p { margin: 0 0 11px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.chat-contact input {
    width: 100%; margin-bottom: 8px; padding: 11px 13px;
    font-family: var(--font-b); font-size: 13.5px; color: var(--text-1);
    background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.chat-contact input:focus { outline: 0; border-color: var(--blue); background: var(--bg); }
.chat-randul-butoane { display: flex; gap: 8px; margin-top: 3px; }
.chat-contact button {
    flex: 1; padding: 11px; cursor: pointer; font-family: var(--font-b);
    font-size: 13.5px; font-weight: 700; border: 0; border-radius: var(--r-sm);
    background: var(--blue); color: #fff; transition: background .2s ease;
}
.chat-contact button:hover:not(:disabled) { background: #1D4ED8; }
.chat-contact button:disabled { opacity: .5; cursor: not-allowed; }
.chat-contact button.chat-renunta { flex: none; background: var(--bg2); color: var(--text-2); font-weight: 600; }
.chat-contact button.chat-renunta:hover { background: var(--border); }
.chat-eroare { margin: 8px 0 0; font-size: 12.5px; color: #DC2626; }

/* ─── sugestii si camp de scris ─── */

.chat-sugestii { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 16px 14px; background: var(--bg2); }
.chat-sugestii button {
    font-family: var(--font-b); font-size: 12.5px; font-weight: 600; cursor: pointer;
    padding: 8px 13px; color: var(--text-2); background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--r-full);
    transition: border-color .2s ease, color .2s ease, transform .2s var(--out);
}
.chat-sugestii button:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.chat-sugestii button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.chat-jos { flex: none; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); }
.chat-forma { display: flex; align-items: flex-end; gap: 9px; }
.chat-forma textarea {
    flex: 1; resize: none; max-height: 110px; min-height: 44px;
    font-family: var(--font-b); font-size: 14px; line-height: 1.45; color: var(--text-1);
    padding: 12px 14px; background: var(--bg2);
    border: 1px solid var(--border); border-radius: var(--r-md);
    transition: border-color .2s ease, background .2s ease;
}
.chat-forma textarea::placeholder { color: var(--text-3); }
.chat-forma textarea:focus { outline: 0; border-color: var(--blue); background: var(--bg); }
.chat-trimite {
    width: 44px; height: 44px; flex: none; display: grid; place-items: center; cursor: pointer;
    border: 0; border-radius: var(--r-md); color: #fff; background: var(--blue);
    transition: background .2s ease, transform .2s var(--out);
}
.chat-trimite:hover:not(:disabled) { background: #1D4ED8; transform: translateY(-1px); }
.chat-trimite:disabled { opacity: .45; cursor: not-allowed; }
.chat-trimite:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.chat-trimite svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
    .chat-fereastra.deschis { animation: none; }
    .chat-lansare, .chat-trimite, .chat-sugestii button { transition: none; }
    .chat-scrie i { animation: none; opacity: .6; }
}
