/**
 * GRAO Bielik Chat Styles
 */

.grao-bielik-chat-widget {
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.grao-bielik-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grao-bielik-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.grao-bielik-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.grao-bielik-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.grao-bielik-chat-messages {
    background: #f5f5f5;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.grao-bielik-message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease-in;
}

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

.grao-bielik-message-avatar {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.grao-bielik-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 75%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.grao-bielik-message-content p {
    margin: 0 0 10px 0;
}

.grao-bielik-message-content p:last-child {
    margin-bottom: 0;
}

.grao-bielik-message-user {
    flex-direction: row-reverse;
}

.grao-bielik-message-user .grao-bielik-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.grao-bielik-typing-indicator {
    padding: 0 20px;
}

.grao-bielik-typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.grao-bielik-typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.grao-bielik-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.grao-bielik-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.grao-bielik-chat-input-wrapper {
    background: white;
    padding: 20px;
    display: flex;
    gap: 12px;
    border-top: 1px solid #ddd;
}

.grao-bielik-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 48px;
    transition: border-color 0.2s;
}

.grao-bielik-chat-input:focus {
    outline: none;
    border-color: #667eea;
}

.grao-bielik-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.grao-bielik-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.grao-bielik-send-btn:active {
    transform: translateY(0);
}

.grao-bielik-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.grao-bielik-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 16px;
    color: #c33;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .grao-bielik-chat-widget {
        margin: 10px;
    }

    .grao-bielik-message-content {
        max-width: 85%;
    }

    .grao-bielik-chat-input-wrapper {
        flex-direction: column;
    }

    .grao-bielik-send-btn {
        width: 100%;
    }
}
