/* SkrittLotto Chatbot - Minimalistisk design */

/* Chat-boble (floating button) */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9998;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(78, 205, 196, 0.5);
}

.chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    fill: white;
    transition: transform 0.3s ease;
}

.chatbot-toggle.open svg {
    transform: rotate(90deg);
}

/* Hjelpetekst-boble */
.chatbot-hint {
    position: fixed;
    bottom: 92px;
    right: 24px;
    background: rgba(30, 35, 45, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 9997;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.chatbot-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

.chatbot-hint::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: rgba(30, 35, 45, 0.95);
    border-right: 1px solid rgba(78, 205, 196, 0.3);
    border-bottom: 1px solid rgba(78, 205, 196, 0.3);
    transform: rotate(45deg);
}

/* Chat-vindu */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    height: 720px;
    max-height: calc(100vh - 140px);
    background: rgba(18, 22, 30, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(78, 205, 196, 0.15);
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chatbot-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(78, 205, 196, 0.4);
    flex-shrink: 0;
}

.chatbot-info h4 {
    color: #fff;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
}

.chatbot-info p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin: 2px 0 0;
}

.chatbot-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Meldinger */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: messageIn 0.3s ease;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.bot {
    align-self: flex-start;
    background: rgba(78, 205, 196, 0.15);
    color: rgba(255, 255, 255, 0.95);
    border-bottom-left-radius: 4px;
}

.chatbot-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message.typing {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
}

.chatbot-message.typing span {
    width: 8px;
    height: 8px;
    background: rgba(78, 205, 196, 0.6);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.chatbot-message.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-message.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-6px);
    }
}

/* Input */
.chatbot-input-container {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid rgba(78, 205, 196, 0.15);
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chatbot-input:focus {
    border-color: rgba(78, 205, 196, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.05);
}

.chatbot-send:active {
    transform: scale(0.95);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Quick suggestions */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
}

.chatbot-suggestion {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.25);
    border-radius: 20px;
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-suggestion:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
        border-radius: 20px 20px 0 0;
    }
    
    .chatbot-toggle {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
    
    .chatbot-hint {
        right: 16px;
        bottom: 80px;
    }
}

/* Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.3);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.5);
}
