/* Chat style for the Spain Immigration Chat plugin */

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

.chat-header h1 {
    margin: 0;
    font-size: 24px;
}

.chat-status {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

#chat-box {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.message.user .message-content {
    background: #007bff;
    color: white;
    margin-left: 10px;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border: 1px solid #e1e8ed;
    margin-right: 10px;
}

.message-sender {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e1e8ed;
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

#user-input:focus {
    border-color: #007bff;
}

#send-btn {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

#send-btn:hover {
    background: #0056b3;
}

#send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.typing-indicator {
    display: none;
    align-items: center;
    margin-bottom: 15px;
}

.typing-dots {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 10px;
    margin-left: 10px;
}

.typing-dots span {
    position: absolute;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { left: 0; animation-delay: 0s; }
.typing-dots span:nth-child(2) { left: 10px; animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { left: 20px; animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

.registration-form {
    padding: 30px;
    text-align: center;
}

.registration-form h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.registration-form p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
}

.start-chat-btn {
    background: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.start-chat-btn:hover {
    background: #0056b3;
}

.start-chat-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.agrin-promotion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    text-align: center;
}

.agrin-promotion h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.agrin-promotion p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.agrin-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.agrin-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.hidden {
    display: none;
}
