/* Custom Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

.chat-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chat-button i {
    font-size: 18px;
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-window.open {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

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

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chat-close:hover {
    background-color: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message.user {
    background-color: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.bot {
    background-color: #f1f3f4;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.typing {
    background-color: #f1f3f4;
    color: #666;
    align-self: flex-start;
    font-style: italic;
}

.chat-input-container {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.chat-send {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chat-send:hover {
    background: var(--secondary);
}

.chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.welcome-message {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 20px;
    }
    
    .chat-widget {
        right: 20px;
        bottom: 20px;
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Appointment form styling */
.appointment-form {
    background: #f8f9fa;
    border: 2px solid #2c5aa0;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    max-width: 400px;
}

.appointment-form h4 {
    color: #2c5aa0;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
}

.appointment-form .form-group {
    margin-bottom: 15px;
}

.appointment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.appointment-form input,
.appointment-form textarea,
.appointment-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.appointment-form input:focus,
.appointment-form textarea:focus,
.appointment-form select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

.appointment-form textarea {
    resize: vertical;
    min-height: 60px;
}

.appointment-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.appointment-form .btn-primary {
    background: #2c5aa0;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    transition: background-color 0.3s;
}

.appointment-form .btn-primary:hover {
    background: #1e3f73;
}

.appointment-form .btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.appointment-form .btn-secondary:hover {
    background: #545b62;
}