/* ==================================================
   AGERNETA CHATBOT – FINAL STYLE
   ================================================== */

#businessxbot-root {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147483647;
    font-family: Montserrat, Arial, sans-serif;
}

/* ================= FLOAT BUTTON ================= */
#businessxbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #006800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

#businessxbot-button .bx_label {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .12em;
}

/* SCHOVÁNÍ TLAČÍTKA PŘI OTEVŘENÍ */
#businessxbot-root:has(#businessxbot-panel[aria-hidden="false"])
#businessxbot-button {
    display: none !important;
}

/* ================= PANEL ================= */
#businessxbot-panel {
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 480px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

#businessxbot-panel[aria-hidden="false"] {
    display: flex;
    animation: fadeUp .2s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= HEADER ================= */
.bx_header {
    background: #006800;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bx_header .bx_title {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .08em;
}

#bx_close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    color: #ffffff;
    border: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;     /* jemně větší */
    line-height: 1;      /* 🔥 KLÍČOVÉ */
    padding: 0;          /* 🔥 KLÍČOVÉ */
}

/* ================= MESSAGES ================= */
.bx_messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
}

.bx_msg {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    max-width: 85%;
    font-size: 14px;
}

.bx_msg.bot {
    background: #f1f1f1;
    color: #111;
}

.bx_msg.user {
    background: #e0e0e0;
    color: #000;
    margin-left: auto;
    text-align: right;
}

/* ================= INPUT ================= */
.bx_input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #ddd;
    background: #ffffff;
}

.bx_input input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.bx_input button {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;

    background: #006800;   /* ZELENÁ */
    color: #ffffff;       /* BÍLÝ TEXT */

    font-weight: 700;
    cursor: pointer;

    transition: background .15s ease, color .15s ease;
}

/* HOVER – desktop */
.bx_input button:hover {
    background: #0F0F0F;   /* ČERNÁ */
    color: #ffffff;
}

/* ACTIVE / FOCUS – klik + mobil */
.bx_input button:active,
.bx_input button:focus {
    background: #0F0F0F;   /* ČERNÁ – žádná červená */
    color: #ffffff;
    outline: none;
    box-shadow: none;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    #businessxbot-root {
        right: 12px;
        bottom: 12px;
    }

    #businessxbot-panel {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }

    .bx_messages {
        max-height: calc(100dvh - 200px);
    }

    .bx_input {
        padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
    }
}
