@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────────── */
.static-chat-widget {
    font-family: 'DM Sans', -apple-system, sans-serif;

    --primary:     #a78bfa;
    --primary-dim: rgba(167, 139, 250, 0.25);
    --secondary:   #7c3aed;
    --accent:      #06b6d4;
    --accent-dim:  rgba(6, 182, 212, 0.15);

    --bg-glass:    rgba(12, 10, 22, 0.72);
    --bg-deep:     rgba(8, 6, 18, 0.88);
    --surface:     rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border:      rgba(167, 139, 250, 0.18);
    --border-bright: rgba(167, 139, 250, 0.45);

    --text:        #e8e2ff;
    --text-muted:  rgba(232, 226, 255, 0.5);
    --text-dim:    rgba(232, 226, 255, 0.3);

    --glow-purple: 0 0 30px rgba(124, 58, 237, 0.35);
    --glow-cyan:   0 0 20px rgba(6, 182, 212, 0.25);

    width: 100%;
    height: 100%;
    min-height: 520px;

    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);

    border-radius: 20px;
    border: 1px solid var(--border);

    box-shadow:
        0 8px 48px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(167, 139, 250, 0.08) inset,
        var(--glow-purple);

    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ── Header ─────────────────────────────────────────────────────── */

.static-chat-header {
    padding: 18px 22px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-shrink: 0;
    min-height: 64px;
}

/* ── Registration Form ──────────────────────────────────────────── */

.static-chat-registration {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    overflow-y: auto;
}

/* скрываем scrollbar */

.static-chat-registration::-webkit-scrollbar {
    display: none;
}

.static-chat-registration {
    scrollbar-width: none;
}

.static-registration-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.static-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.static-form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

/* ── Inputs ───────────────────────────────────────────────────── */

.static-form-group input,
.static-form-group textarea {

    padding: 11px 15px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;

    font-size: 14px;
    font-family: 'DM Sans', sans-serif;

    color: #fff;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;

    outline: none;

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.static-form-group input::placeholder,
.static-form-group textarea::placeholder {
    color: var(--text-dim);
}

/* chrome autofill fix */

.static-form-group input:-webkit-autofill,
.static-form-group textarea:-webkit-autofill {

    -webkit-text-fill-color: #fff;

    transition: background-color 9999s ease-in-out 0s;
}

.static-form-group textarea {
    resize: vertical;
    min-height: 70px;
    max-height: 110px;
}

/* ── Start Button ───────────────────────────────────────────────── */

.static-chat-start-btn {

    background: linear-gradient(135deg, var(--secondary), #4c1d95);

    color: #fff;

    border: 1px solid rgba(167, 139, 250, 0.3);

    padding: 14px 28px;

    border-radius: 12px;

    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    margin-top: 10px;
    width: 100%;
}

/* ── Chat Interface ───────────────────────────────────────────── */

.static-chat-interface {

    display: none;
    flex-direction: column;

    height: 100%;
    min-height: 0;
}

.static-chat-interface.active {
    display: flex;
}

/* ── Messages ─────────────────────────────────────────────────── */

.static-chat-messages {

    flex: 1;
    min-height: 0;

    padding: 18px;

    overflow-y: auto;

    display: flex;
    flex-direction: column;

    gap: 10px;
}

/* message */

.static-chat-message {

    padding: 11px 15px;

    border-radius: 14px;

    max-width: 88%;

    font-size: 14px;
}

/* user */

.static-chat-message.user {

    background: linear-gradient(
        135deg,
        rgba(124, 58, 237, 0.45),
        rgba(6, 182, 212, 0.28)
    );

    color: #f0ebff;

    align-self: flex-end;
}

/* bot */

.static-chat-message.bot {

    background: var(--surface);

    border: 1px solid var(--border);

    color: var(--text);

    align-self: flex-start;
}

/* ── Input Area ───────────────────────────────────────────────── */

.static-chat-input-area {

    padding: 12px 16px;

    border-top: 1px solid var(--border);

    display: flex;

    gap: 10px;

    flex-shrink: 0;

    background: var(--bg-deep);
}

/* chat input */

.static-chat-input {

    flex: 1;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 10px 14px;

    font-family: 'DM Sans', sans-serif;

    font-size: 14px;

    color: #fff;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;

    outline: none;

    min-height: 18px;
    max-height: 80px;
}

/* send button */

.static-chat-send {

    background: linear-gradient(
        135deg,
        var(--secondary),
        #4c1d95
    );

    border: 1px solid rgba(167,139,250,0.3);

    border-radius: 10px;

    padding: 0 16px;

    color: #fff;

    cursor: pointer;

    font-family: 'Syne', sans-serif;
    font-size: 13px;

    min-width: 70px;
    height: 42px;
}