.lunahome-chat {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 10000;
    font-size: 0.92rem;
}

.lunahome-chat__toggle {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b5f59, #0f766e);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 118, 110, 0.28);
}

.lunahome-chat__toggle i {
    font-size: 1.35rem;
}

.lunahome-chat__panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: min(360px, calc(100vw - 2rem));
    height: 480px;
    max-height: calc(100vh - 7rem);
    display: none;
    grid-template-rows: auto 1fr auto auto;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #dbe8e3;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.22);
}

.lunahome-chat.is-open .lunahome-chat__panel {
    display: grid;
}

.lunahome-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, #0f332f, #0f766e);
    color: #ffffff;
}

.lunahome-chat__header strong,
.lunahome-chat__header span {
    display: block;
}

.lunahome-chat__header span {
    color: #fff1bf;
    font-size: 0.78rem;
}

.lunahome-chat__header button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.lunahome-chat__messages {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    padding: 1rem;
    overflow-y: auto;
    background: #f7faf7;
}

.lunahome-chat__message {
    display: flex;
}

.lunahome-chat__message--user {
    justify-content: flex-end;
}

.lunahome-chat__message div {
    max-width: 82%;
    padding: 0.72rem 0.82rem;
    border-radius: 8px;
    line-height: 1.45;
}

.lunahome-chat__message--bot div {
    background: #ffffff;
    border: 1px solid #dbe8e3;
    color: #16211f;
}

.lunahome-chat__message--user div {
    background: #0f766e;
    color: #ffffff;
}

.lunahome-chat__message a {
    display: inline-flex;
    align-items: center;
    margin-top: 0.58rem;
    color: #0f766e;
    font-weight: 750;
    text-decoration: none;
}

.lunahome-chat__quick {
    display: flex;
    gap: 0.45rem;
    padding: 0.75rem 0.85rem 0;
    background: #ffffff;
    overflow-x: auto;
}

.lunahome-chat__quick button {
    flex: 0 0 auto;
    border: 1px solid #dbe8e3;
    border-radius: 999px;
    background: #dff4ee;
    color: #0f766e;
    font-weight: 700;
    padding: 0.42rem 0.68rem;
}

.lunahome-chat__form {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 0.55rem;
    padding: 0.85rem;
    background: #ffffff;
}

.lunahome-chat__form input {
    min-width: 0;
    min-height: 44px;
    border: 1px solid #dbe8e3;
    border-radius: 999px;
    padding: 0 0.9rem;
    color: #16211f;
}

.lunahome-chat__form button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #e7b93f;
    color: #16211f;
}

[data-theme="dark"] .lunahome-chat__panel,
[data-theme="dark"] .lunahome-chat__quick,
[data-theme="dark"] .lunahome-chat__form {
    background: #0f172a;
    border-color: #1e293b;
}

[data-theme="dark"] .lunahome-chat__messages {
    background: #020617;
}

[data-theme="dark"] .lunahome-chat__message--bot div {
    background: #111827;
    border-color: #334155;
    color: #e5e7eb;
}

[data-theme="dark"] .lunahome-chat__form input {
    background: #020617;
    border-color: #334155;
    color: #e5e7eb;
}

[data-theme="dark"] .lunahome-chat__quick button {
    background: #111827;
    border-color: #334155;
    color: #5eead4;
}

@media (max-width: 575.98px) {
    .lunahome-chat {
        right: 0.85rem;
        bottom: 0.85rem;
    }

    .lunahome-chat__panel {
        height: min(460px, calc(100vh - 6.5rem));
    }
}
