@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1e88e5;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --bot-message-bg: #e3f2fd;
    --user-message-bg: #e8f5e9;
    --border-radius: 12px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100%;
    padding: 0;
}

.chatbot-container {
    background-color: white;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    text-align: center;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.logo i {
    font-size: 24px;
}

.chatbot-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.chatbot-header p {
    font-size: 14px;
    opacity: 0.9;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    line-height: 1.5;
}

.bot-message {
    align-self: flex-start;
    background-color: var(--bot-message-bg);
    border-bottom-right-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.user-message {
    align-self: flex-end;
    background-color: var(--user-message-bg);
    border-bottom-right-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    border-top-left-radius: var(--border-radius);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-content p {
    font-size: 16px;
    color: var(--text-color);
}

.message-content .typing {
    display: flex;
    gap: 4px;
}

.typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #aaa;
    animation: typingAnimation 1s infinite ease-in-out;
}

.typing span:nth-child(1) {
    animation-delay: 0s;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.chat-input-area {
    display: flex;
    padding: 15px;
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

#user-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: var(--primary-color);
}

#send-btn, #mic-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-btn:hover, #mic-btn:hover {
    background-color: #1565c0;
}

#send-btn i, #mic-btn i {
    font-size: 18px;
}

#mic-btn.recording {
    background-color: #e53935;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(229, 57, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
    }
}

/* For highlighting text during streaming */
.highlight {
    background-color: yellow;
    transition: background-color 0.5s;
}

/* Mobile Permission Popup */
.mobile-permission-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.mobile-permission-popup.show {
    display: flex;
}

.popup-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    position: relative;
    box-shadow: var(--box-shadow);
}

.popup-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.popup-content p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.permission-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: background-color 0.3s;
}

.permission-btn i {
    margin-left: 8px;
}

.permission-btn:hover {
    background-color: #1565c0;
}

.close-popup-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .chatbot-header h2 {
        font-size: 18px;
    }
    
    .message-content p {
        font-size: 14px;
    }
    
    #user-input {
        font-size: 14px;
    }
}

/* Doctor Cards Styles */
.doctor-cards-container {
    padding: 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-color);
    text-align: right;
}

.doctor-cards {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.doctor-cards::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.doctor-cards {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.doctor-card {
    min-width: 250px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 15px;
    transition: transform 0.3s;
    border-right: 4px solid var(--primary-color);
}

.doctor-card:hover {
    transform: translateY(-5px);
}

.doctor-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.doctor-info {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 6px;
}

.doctor-discount {
    font-weight: 600;
    color: #4caf50;
    font-size: 16px;
    margin: 10px 0;
}

.doctor-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    color: var(--primary-color);
}

.doctor-phone i {
    font-size: 14px;
}