:root {
    --chat-primary: #a855f7;
    --chat-secondary: #ec4899;
    --chat-bg: #05030d;
    --chat-panel: #0f0a1f;
    --chat-text: #f4f3ff;
    --chat-user: #7c3aed;
    --chat-bot: #1e1b4b;
    --chat-radius: 18px;
    --chat-font-size: 15px;
    --chat-font: 'Roboto', sans-serif;
}

.modello-chatbot {
    position: fixed;
    z-index: 99999;
    font-family: var(--chat-font);
    color: var(--chat-text);
}

.modello-chatbot.bottom-right { bottom: 24px; right: 24px; }
.modello-chatbot.bottom-left { bottom: 24px; left: 24px; }
.modello-chatbot.top-right { top: 24px; right: 24px; }
.modello-chatbot.top-left { top: 24px; left: 24px; }

.chat-launch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: transparent;
    position: relative;
    padding: 0;
    display: block;
}
.chat-launch .ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid;
    pointer-events: none;
}

.chat-launch .ring-1 {
    border-color: var(--chat-primary);
    animation: pulse-ring-1 2s infinite;
    animation-delay: 0s;
    inset: -4px;
}

.chat-launch .ring-2 {
    border-color: var(--chat-secondary);
    animation: pulse-ring-2 2.5s infinite;
    animation-delay: 0.3s;
    inset: -4px;
}

.chat-launch .ring-3 {
    border-color: var(--chat-primary);
    animation: pulse-ring-3 3s infinite;
    animation-delay: 0.6s;
    inset: -4px;
}
.chat-launch .inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    overflow: hidden;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-launch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.chat-launch:hover .ring-1 {
    border-color: var(--chat-primary);
    animation-duration: 1.5s;
}

.chat-launch:hover .ring-2 {
    border-color: var(--chat-secondary);
    animation-duration: 1.8s;
}

.chat-launch:hover .ring-3 {
    border-color: var(--chat-primary);
    animation-duration: 2.1s;
}

/* Modern betöltési animáció - elegáns, szofisztikált */
.chat-launch.page-load-pulse {
    animation: page-load-entrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chat-launch.page-load-pulse .inner {
    position: relative;
    animation: page-load-pulse 2s ease-in-out 2;
    overflow: hidden;
}

.chat-launch.page-load-pulse .inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shimmer-sweep 2.5s ease-in-out 2;
    pointer-events: none;
    z-index: 1;
}

.chat-launch.page-load-pulse .inner img {
    position: relative;
    z-index: 2;
}

.chat-launch.page-load-pulse .ring-1 {
    animation: pulse-ring-1 2s infinite, page-load-ring-glow 2s ease-in-out 2;
}

.chat-launch.page-load-pulse .ring-2 {
    animation: pulse-ring-2 2.5s infinite, page-load-ring-glow 2s ease-in-out 2 0.1s;
}

.chat-launch.page-load-pulse .ring-3 {
    animation: pulse-ring-3 3s infinite, page-load-ring-glow 2s ease-in-out 2 0.2s;
}

@keyframes page-load-entrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px) rotate(-5deg);
    }
    60% {
        transform: scale(1.05) translateY(-2px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

@keyframes page-load-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4), 0 0 0 0 rgba(236, 72, 153, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 8px rgba(168, 85, 247, 0.3), 0 0 30px 12px rgba(236, 72, 153, 0.2);
    }
}

@keyframes page-load-ring-glow {
    0%, 100% {
        opacity: 0.6;
        border-width: 2px;
    }
    50% {
        opacity: 1;
        border-width: 3px;
        box-shadow: 0 0 15px rgba(168, 85, 247, 0.5), 0 0 25px rgba(236, 72, 153, 0.3);
    }
}

@keyframes shimmer-sweep {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
    100% {
        transform: translateX(200%) translateY(200%) rotate(45deg);
    }
}

.presence {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--chat-bg);
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,.9);
    z-index: 10;
}
.presence--offline {
    background: #6b7280 !important;
    box-shadow: 0 0 10px rgba(107,114,128,.8);
}
.presence--thinking {
    background: #facc15 !important;
    box-shadow: 0 0 12px rgba(250,204,21,.9);
    animation: thinking-pulse 1.5s infinite;
}
@keyframes thinking-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.chat-window {
    position: absolute;
    bottom: 96px;
    right: 0;
    width: 450px;
    height: 750px;
    max-height: calc(100vh - 120px);
    max-width: calc(100vw - 16px);
    background: var(--chat-panel);
    border-radius: 23px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 40px 120px rgba(0,0,0,0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
}
.chat-window[hidden] {
    display: none !important;
}

.chat-header {
    padding: 0;
    background: linear-gradient(135deg, rgba(168,85,247,.35), rgba(236,72,153,.25));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    height: 70px;
    padding: 0 18px;
    box-sizing: border-box;
}
.identity {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.identity img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    object-fit: cover;
}
.identity > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.identity strong {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.status-text {
    font-size: 0.75rem;
    opacity: .85;
    white-space: nowrap;
    line-height: 1.3;
    margin-top: 1px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    position: absolute;
    top: 11px;
    right: 18px;
}
.header-actions button {
    background: none;
    border: none;
    color: var(--chat-text);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
}
.header-actions button:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}
.header-actions button:active {
    transform: scale(0.95);
}

/* Három pont minimalizáló gomb */
.chat-minimize .minimize-dots {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    height: 100%;
    justify-content: center;
}
.chat-minimize .minimize-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    display: block;
}

/* Maximize gomb */
.chat-maximize {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.chat-maximize svg {
    width: 16px;
    height: 16px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
}
.chat-maximize .maximize-icon {
    opacity: 1;
}
.chat-maximize .restore-icon {
    opacity: 0;
}
.chat-window.maximized .chat-maximize .maximize-icon {
    opacity: 0;
}
.chat-window.maximized .chat-maximize .restore-icon {
    opacity: 1;
}
.chat-window:not(.maximized) .chat-maximize .maximize-icon {
    opacity: 1;
}
.chat-window:not(.maximized) .chat-maximize .restore-icon {
    opacity: 0;
}

/* Maximized chat window */
.chat-window.maximized {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: 90vw !important;
    max-width: 1200px !important;
    height: 90vh !important;
    max-height: 900px !important;
    bottom: auto !important;
    right: auto !important;
    z-index: 100000;
    border-radius: 24px;
    box-shadow: 0 60px 160px rgba(0,0,0,0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive maximize - mobil esetén */
@media (max-width: 768px) {
    .chat-window.maximized {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }
}

/* Dropdown menü wrapper */
.dropdown-menu-wrapper {
    position: relative;
    z-index: 10001;
}

/* Dropdown menü - chat buborék stílusával, tökéletes pozícionálás */
.dropdown-menu {
    position: fixed;
    background: linear-gradient(135deg, rgba(15, 10, 31, 0.98) 0%, rgba(30, 27, 75, 0.95) 50%, rgba(15, 10, 31, 0.98) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--chat-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.3), inset 0 0 40px rgba(168, 85, 247, 0.05);
    padding: 0;
    padding-top: 0;
    min-width: 260px;
    width: auto;
    z-index: 10000;
    animation: dropdownFadeIn 0.15s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: visible;
    gap: 0;
}

/* Dropdown menü felső rész - három gomb átlátszó háttérrel */
.dropdown-header-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    padding: 8px 8px 4px 8px;
    background: rgba(15, 10, 31, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: var(--chat-radius) var(--chat-radius) 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--chat-text);
    font-size: 1.1rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    position: relative;
    flex-shrink: 0;
}

.dropdown-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.dropdown-header-btn:active {
    transform: scale(0.95);
}

.dropdown-header-btn .minimize-dots {
    display: flex;
    align-items: center;
    gap: 2.5px;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.dropdown-header-btn .minimize-dots span {
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    background: currentColor;
    display: block;
}

.dropdown-header-btn.dropdown-maximize-btn svg {
    width: 14px;
    height: 14px;
    transition: opacity 0.2s ease;
    position: absolute;
}

.dropdown-header-btn.dropdown-maximize-btn .maximize-icon {
    opacity: 1;
}

.dropdown-header-btn.dropdown-maximize-btn .restore-icon {
    opacity: 0;
}

.chat-window.maximized ~ * .dropdown-header-btn.dropdown-maximize-btn .maximize-icon,
.chat-window.maximized .dropdown-header-btn.dropdown-maximize-btn .maximize-icon {
    opacity: 0;
}

.chat-window.maximized ~ * .dropdown-header-btn.dropdown-maximize-btn .restore-icon,
.chat-window.maximized .dropdown-header-btn.dropdown-maximize-btn .restore-icon {
    opacity: 1;
}

.chat-window:not(.maximized) ~ * .dropdown-header-btn.dropdown-maximize-btn .maximize-icon,
.chat-window:not(.maximized) .dropdown-header-btn.dropdown-maximize-btn .maximize-icon {
    opacity: 1;
}

.chat-window:not(.maximized) ~ * .dropdown-header-btn.dropdown-maximize-btn .restore-icon,
.chat-window:not(.maximized) .dropdown-header-btn.dropdown-maximize-btn .restore-icon {
    opacity: 0;
}

/* Maximized állapotban a menü magasabb z-index */
.chat-window.maximized ~ * .dropdown-menu,
.chat-window.maximized .dropdown-menu {
    z-index: 100001 !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu[hidden] {
    display: none !important;
}


.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding: 8px 18px 8px 26px;
    background: transparent;
    border: none;
    color: var(--chat-text);
    font-size: var(--chat-font-size);
    font-family: var(--chat-font);
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 0;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: visible;
    position: relative;
    border-radius: 0;
    min-width: 0;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item:first-child {
    border-radius: calc(var(--chat-radius) - 2px) calc(var(--chat-radius) - 2px) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 calc(var(--chat-radius) - 2px) calc(var(--chat-radius) - 2px);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-item:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.98);
}

.dropdown-text {
    flex: 1;
    line-height: 1.5;
    font-weight: 400;
    font-size: var(--chat-font-size);
    font-family: var(--chat-font);
    color: var(--chat-text);
    white-space: nowrap;
    overflow: visible;
    text-align: left;
    min-width: 0;
    padding: 0;
    margin: 0;
    opacity: 0.95;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
    word-break: keep-all;
    display: block;
}

.dropdown-item:hover .dropdown-text {
    opacity: 1;
}

.dropdown-icon {
    font-size: 0.9rem;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0.9;
    text-align: center;
    margin: 0;
    padding: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    flex: 0 0 18px;
}

.dropdown-item:hover .dropdown-icon {
    opacity: 1;
    transform: scale(1.05);
}

/* Toast üzenet animáció */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modello-toast {
    animation: fadeInUp 0.3s ease;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: messageSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.message.bot {
    justify-content: flex-start;
    animation: botMessageSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.message.user {
    justify-content: flex-end;
    animation: userMessageSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes botMessageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes userMessageSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.bubble {
    padding: 11px 15px;
    border-radius: var(--chat-radius);
    background: var(--chat-bot);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
    max-width: 80%;
    min-width: 60px;
    font-size: var(--chat-font-size);
    line-height: 1.5;
    word-wrap: break-word;
}
.bubble:empty {
    display: none;
}
.bubble .message-text {
    margin-bottom: 8px;
}
.bubble .message-text:last-child {
    margin-bottom: 0;
}
.bubble .message-text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--chat-radius);
    margin: 8px 0;
    display: block;
}
.bubble .message-text a {
    color: var(--chat-primary);
    text-decoration: underline;
    transition: opacity 0.2s ease;
}
.bubble .message-text a:hover {
    opacity: 0.8;
}
.bubble .message-text a[download] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    text-decoration: none;
}
.bubble .message-text a[download]:hover {
    background: rgba(255,255,255,0.15);
}

/* Csatolmány megjelenítés */
.message-attachment {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-attachment a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--chat-text);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.message-attachment a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.message.user .bubble {
    background: var(--chat-user);
}

.typing {
    display: flex;
    gap: 4px;
    padding: 0 16px 16px;
    align-items: center;
}
.typing[hidden] {
    display: none !important;
}
.typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    animation: typing 1.2s infinite;
}
.typing span:nth-child(2) {
    animation-delay: .15s;
}
.typing span:nth-child(3) {
    animation-delay: .3s;
}

/* Apple Messenger stílusú typing animáció */
@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Message animáció - Apple Messenger stílus */
.message.bot {
    animation: messageSlideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.user {
    animation: messageSlideInUser 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes messageSlideInUser {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Szöveg animáció karakterenként */
.message-text {
    position: relative;
}
.message-text.animating {
    overflow: hidden;
}

.chat-input {
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.input-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 23px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    background: #ffffff;
    padding: 6px 12px;
    transition: all 0.2s ease;
    position: relative;
    min-height: 40px;
    width: 100%;
    max-width: 520px;
}

.input-shell .input-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
    margin-left: 4px;
}
.input-shell:focus-within {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}
.input-shell textarea {
    flex: 1;
    background: transparent;
    border: none;
    resize: none;
    color: #000000;
    font-family: inherit;
    font-size: 15px;
    padding: 8px 4px;
    padding-right: 8px;
    height: 24px;
    min-height: 24px;
    max-height: 24px;
    line-height: 1.5;
    outline: none;
    overflow-y: hidden;
    margin-right: 4px;
}
.input-shell textarea::placeholder {
    color: rgba(107, 114, 128, 0.7);
}
.input-shell .send {
    border: none;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    margin-left: -4px;
    position: relative;
    z-index: 1;
}
.input-shell .send:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(168,85,247,0.3);
}
.input-shell .send:active {
    transform: scale(0.95);
}
.input-shell .send svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    stroke-width: 2;
}

/* Attachment toggle button */
.input-shell .attachment-toggle {
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    margin-right: -4px;
}

.input-shell .attachment-toggle:hover {
    background: rgba(107, 114, 128, 0.1);
    color: var(--chat-primary);
    transform: scale(1.02);
}

.input-shell .attachment-toggle:active {
    transform: scale(0.95);
}

.input-shell .attachment-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Emoji toggle button */
.input-shell .emoji-toggle {
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    margin-left: -7px !important;
    margin-right: -4px;
    position: relative;
    left: -3px;
}

.input-shell .emoji-toggle:hover {
    background: rgba(107, 114, 128, 0.1);
    color: var(--chat-primary);
    transform: scale(1.02);
}

.input-shell .emoji-toggle:active {
    transform: scale(0.95);
}

.input-shell .emoji-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Attachment preview */
.attachment-preview {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100%;
    box-sizing: border-box;
}

.attachment-preview[hidden] {
    display: none !important;
}

.attachment-preview-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.attachment-name {
    flex: 1;
    font-size: 13px;
    color: var(--chat-text);
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: calc(100% - 40px);
}

.attachment-remove {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--chat-text);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.attachment-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.attachment-remove:active {
    transform: scale(0.95);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    animation: emojiPickerFadeIn 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}

.emoji-picker[hidden] {
    display: none !important;
}

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

.emoji-categories {
    display: none;
}

.emoji-categories::-webkit-scrollbar {
    display: none;
}

.emoji-category {
    border: none;
    background: rgba(243, 244, 246, 0.8);
    color: #6b7280;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    padding: 0;
    flex-shrink: 0;
}

.emoji-category:hover {
    background: rgba(229, 231, 235, 0.8);
    transform: scale(1.05);
}

.emoji-category.active {
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    color: #fff;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-height: 140px;
    overflow: hidden;
    padding: 12px;
    scrollbar-width: none;
    justify-items: center;
    align-items: center;
}

.emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.emoji-grid::-webkit-scrollbar-track {
    background: transparent;
}

.emoji-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.emoji-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 24px;
    user-select: none;
    background: transparent;
    border: none;
    padding: 0;
}

.emoji-item:hover {
    background: rgba(243, 244, 246, 0.8);
    transform: scale(1.1);
}

.emoji-item:active {
    transform: scale(1.0);
    background: rgba(229, 231, 235, 0.8);
}

.gdpr { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 8px; }
.gdpr a { color: var(--chat-secondary); }

@keyframes pulse {
    0% { transform: scale(0.9); opacity: .7; }
    70% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

@keyframes pulse-ring-1 {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes pulse-ring-2 {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes pulse-ring-3 {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.2;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}
@keyframes typing {
    0%, 80%, 100% { opacity: .2; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-6px); }
}

@media (max-width: 520px) {
    .chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px) !important;
        max-height: calc(100vh - 120px) !important;
        max-width: calc(100vw - 32px);
        right: 50%;
        transform: translateX(50%);
    }
}
.modello-chatbot.small .chat-window {
    width: 320px;
    height: 500px;
    max-height: 80vh;
}
.modello-chatbot.large .chat-window {
    width: 420px;
    height: 650px;
    max-height: 90vh;
}

.modello-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(5,5,20,0.9);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 9999;
}
.modello-toast.visible { opacity: 1; transform: translateY(0); }
.modello-toast.error { background: rgba(239,68,68,0.85); }

/* Időzített felugró üzenet */
.modello-timed-popup {
    position: fixed;
    inset: 0;
    background: rgba(5,3,13,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modello-timed-popup.visible {
    opacity: 1;
}
.popup-content {
    background: var(--chat-panel);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(168,85,247,0.1);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modello-timed-popup.visible .popup-content {
    transform: scale(1) translateY(0);
}
.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--chat-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    opacity: 0.7;
}
.popup-close:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    opacity: 1;
    transform: scale(1.05);
}
.popup-message {
    color: var(--chat-text);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
    padding-right: 24px;
    font-weight: 500;
}
.popup-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.popup-button {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}
.popup-button--primary {
    background: linear-gradient(120deg, var(--chat-primary), var(--chat-secondary));
    color: #fff;
    box-shadow: 0 4px 16px rgba(168,85,247,0.3);
}
.popup-button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168,85,247,0.4);
}
.popup-button--primary:active {
    transform: translateY(0);
}
.popup-button--ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--chat-text);
}
.popup-button--ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

@media (max-width: 520px) {
    .popup-content {
        padding: 24px 20px;
        max-width: 100%;
    }
    .popup-actions {
        flex-direction: column;
    }
    .popup-button {
        width: 100%;
    }
}

/* Rich Messages */
.modello-rich-message {
    margin-top: 12px;
}

/* Carousel */
.modello-carousel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}
.modello-carousel::-webkit-scrollbar {
    width: 4px;
}
.modello-carousel::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
}
.modello-carousel::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}
.modello-carousel-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
}
.modello-carousel-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(168,85,247,0.3);
    transform: translateY(-2px);
}
.carousel-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}
.carousel-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--chat-text);
}
.carousel-description {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px 0;
    line-height: 1.4;
}
.carousel-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}
.carousel-price {
    color: #22c55e;
    font-weight: 600;
}
.carousel-duration {
    color: rgba(255,255,255,0.6);
}

/* Buttons */
.modello-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.modello-button {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.modello-button--primary {
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    color: #fff;
    box-shadow: 0 2px 8px rgba(168,85,247,0.3);
}
.modello-button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168,85,247,0.4);
}
.modello-button--secondary {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--chat-text);
}
.modello-button--secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}
.modello-button--ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--chat-text);
}
.modello-button--ghost:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.25);
}

/* CTA „chip” gombok – a mellékelt stílus alapján */
.modello-button--chip1,
.modello-button--chip2,
.modello-button--chip3,
.modello-button--chip4,
.modello-button--chip5 {
    background: transparent;
    border-width: 1.5px;
    border-style: solid;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.6), 0 0 16px rgba(0,0,0,0.9);
}

.modello-button--chip1 {
    border-color: rgba(251, 146, 60, 0.9); /* narancs */
    color: rgba(251, 146, 60, 1);
    box-shadow: 0 0 0 1px rgba(251,146,60,0.35), 0 0 18px rgba(251,146,60,0.4);
}

.modello-button--chip2 {
    border-color: rgba(244, 114, 182, 0.9); /* pink */
    color: rgba(244, 114, 182, 1);
    box-shadow: 0 0 0 1px rgba(244,114,182,0.35), 0 0 18px rgba(244,114,182,0.4);
}

.modello-button--chip3 {
    border-color: rgba(56, 189, 248, 0.9); /* kék */
    color: rgba(56, 189, 248, 1);
    box-shadow: 0 0 0 1px rgba(56,189,248,0.35), 0 0 18px rgba(56,189,248,0.4);
}

.modello-button--chip4 {
    border-color: rgba(248, 113, 113, 0.9); /* piros */
    color: rgba(248, 113, 113, 1);
    box-shadow: 0 0 0 1px rgba(248,113,113,0.35), 0 0 18px rgba(248,113,113,0.4);
}

.modello-button--chip5 {
    border-color: rgba(74, 222, 128, 0.9); /* zöld */
    color: rgba(74, 222, 128, 1);
    box-shadow: 0 0 0 1px rgba(74,222,128,0.35), 0 0 18px rgba(74,222,128,0.4);
}

.modello-button--chip1:hover,
.modello-button--chip2:hover,
.modello-button--chip3:hover,
.modello-button--chip4:hover,
.modello-button--chip5:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 0 22px rgba(168,85,247,0.5);
    background: rgba(255,255,255,0.03);
}

/* Quick Replies */
.modello-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 0;
    margin-top: 8px;
}
.modello-quick-reply {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--chat-text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.modello-quick-reply:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(168,85,247,0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(168,85,247,0.2);
}
.modello-quick-reply:active {
    transform: translateY(0);
}

@media (max-width: 520px) {
    .modello-carousel-item {
        padding: 10px;
    }
    .carousel-image {
        height: 100px;
    }
    .modello-buttons {
        gap: 6px;
    }
    .modello-button {
        padding: 9px 14px;
        font-size: 0.85rem;
    }
    .modello-quick-replies {
        gap: 6px;
    }
    .modello-quick-reply {
        padding: 7px 12px;
        font-size: 0.8rem;
    }
}

/* Tooltip Styles */
.modello-tooltip {
    position: absolute;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.4;
    max-width: 250px;
    word-wrap: break-word;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modello-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.modello-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* ========================================
   Moderátor csatolmányok stílusai
   Egyszerű, elegáns - csak ikon + szöveg
   Link: KÉK, Kép: ZÖLD, Dokumentum: LILA
   ======================================== */

.mod-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    transition: all 0.2s ease;
}

.mod-attachment:hover {
    opacity: 0.8;
}

.mod-attachment-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod-attachment-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.mod-attachment-link {
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mod-attachment-link:hover {
    text-decoration: underline;
}

/* ===== LINK - KÉK ===== */
.mod-attachment--link .mod-attachment-icon svg {
    stroke: #3B82F6;
}

.mod-attachment--link .mod-attachment-link {
    color: #3B82F6;
}

/* ===== KÉP - ZÖLD ===== */
.mod-attachment--image .mod-attachment-icon svg {
    stroke: #10B981;
}

.mod-attachment--image .mod-attachment-link {
    color: #10B981;
}

/* ===== DOKUMENTUM - LILA ===== */
.mod-attachment--document .mod-attachment-icon svg {
    stroke: #8B5CF6;
}

.mod-attachment--document .mod-attachment-link {
    color: #8B5CF6;
}
