/* Eastend Tattoo Chatbot Stílusok - Új, a weboldal designjához igazított verzió */
/* --- Chatbot Gomb --- */
/* A gomb stílusát nagyrészt meghagytam, mert tetszett, de a színeket a weboldal változóihoz igazítottam. */
.chatbot-toggle {
    position: fixed;
    bottom: 110px;

    /* Megemelve, hogy a Back to Top gomb felett legyen */
    right: 20px;
    background: transparent;

    /* Alapból átlátszó */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 9998;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chatbot-toggle.visible {
    opacity: 1;
    visibility: visible;
}

.chatbot-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.chatbot-toggle.hidden {
    display: none;
}

/* --- Chatbot Widget (Ablak) --- */
.chatbot-widget {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: #1e1e1e;

    /* Sötét háttér, mint az 'about' és 'prices' oldalakon */
    border-radius: 15px;

    /* Kisebb, élesebb rádiusz */
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);

    /* Erősebb árnyék a kiemeléshez */
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: var(--font-primary, 'Roboto', sans-serif);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-widget.open {
    display: flex;
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Chatbot Fejléc --- */
.chatbot-header {
    background: #111;

    /* Sötétebb, egységes háttér */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
    border-bottom: 2px solid var(--color-primary);

    /* Vörös elválasztó vonal */
    box-shadow: none;
}

.chatbot-header h4 {
    margin: 0;
    font-family: var(--font-secondary, 'Roboto Slab', serif);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header .chatbot-icon {
    font-size: 18px;
    color: var(--color-primary);
}

.chatbot-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chatbot-close:hover {
    color: var(--color-primary);
}

/* --- Üzenetek Területe --- */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #111;

    /* A fejléc háttérszínével megegyező */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Scrollbar stílus */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #222;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #d63f49;

    /* Világosabb vörös hoverre */
}

/* --- Üzenetek --- */
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    position: relative;
    animation: messageSlide 0.3s ease-out;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.message.user {
    background: var(--color-primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.bot {
    background: #2a2a2a;

    /* Sötétszürke háttér */
    color: #e0e0e0;

    /* Világosabb szövegszín */
    border: none;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message.bot strong {
    color: #ffffff;

    /* Fehér kiemelés */
    font-weight: 700;
}

.message.bot em {
    color: #b0b0b0;
    font-style: italic;
}

.message-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
    text-align: right;
}

.message.bot .message-time {
    text-align: left;
}

/* --- Gépelés Indikátor --- */
.typing-indicator {
    padding: 12px 16px;

    /* Megfelelő méret */
}

.typing-dots span {
    background: var(--color-primary);
}

/* --- Input Terület --- */
.chatbot-input {
    padding: 15px 20px;
    border-top: 2px solid var(--color-primary);
    background: #111;

    /* Fejléccel megegyező háttér */
    display: flex;
    gap: 10px;
    align-items: flex-end;
    border-radius: 0 0 15px 15px;
}

.chatbot-input-field {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);

    /* Kontakt űrlap stílusa */
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background: rgba(255, 255, 255, 0.05);

    /* Sötét, áttetsző háttér */
    color: #fff;
    min-height: 45px;
    max-height: 100px;
    font-family: var(--font-primary, 'Roboto', sans-serif);
}

.chatbot-input-field:focus {
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.chatbot-input-field::placeholder {
    color: #888;
}

.chatbot-send {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send:hover:not(:disabled) {
    transform: scale(1.05);
    background: #8b242b;

    /* Sötétebb vörös */
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #444;
}

/* --- Egyéb stílusok (maradtak az eredetiből, de a színeket igazítottam) --- */
.welcome-message,
.error-message,
.chatbot-offline {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin: 0 10px 10px 10px;
    font-size: 13px;
    border: 1px solid;
}

.welcome-message {
    background: rgba(46, 173, 55, 0.1);
    color: #b8e994;
    border-color: rgba(46, 173, 55, 0.3);
}

.error-message {
    background: rgba(201, 48, 44, 0.1);
    color: #f6b9b7;
    border-color: rgba(201, 48, 44, 0.3);
}

.chatbot-offline {
    background: rgba(255, 193, 7, 0.1);
    color: #ffeaa7;
    border-color: rgba(255, 193, 7, 0.3);
}

.chatbot-loading {
    /* opacity: 0.7; */
    pointer-events: none;
}

.chatbot-toggle.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(173, 46, 55, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(173, 46, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(173, 46, 55, 0);
    }
}

/* --- Mobil Reszponzivitás --- */
@media (max-width: 768px) {
    .chatbot-widget {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        right: 20px;
        bottom: 90px;
        border-radius: 15px;
    }

    .chatbot-toggle {
        bottom: 105px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    .message {
        max-width: 85%;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: 10px;
        bottom: 70px;
        border-radius: 10px;
    }

    .chatbot-messages,
    .chatbot-input {
        padding: 15px;
    }
}