/* Main Content */
.tabber {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.spacer {
    margin: 10px 0 20px;
    border-color: #fff;
}

.cta-button {
    height: 40px;
    padding: 5px 28px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    transition: background-color 0.3s;
    cursor: pointer;
}

/* Specialties Panel */
.specialties-panel {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    height: fit-content;
}

.panel-title {
    font-size: 1.5rem;
/*            margin-bottom: 1.5rem;*/
/*            padding-bottom: 0.8rem;*/
    color: var(--dark);
/*            border-bottom: 2px solid var(--gray-light);*/
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.specialty-card {
    background: var(--light);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.specialty-card.selected {
    background-color: #dbeafe;
    border-color: var(--primary);
    color: var(--primary-dark);
}

.specialty-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.specialty-name {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Chat Panel */
.chat-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.2rem 1.5rem;
}

.chat-title {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-specialty {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.chat-disclaimer {
    font-size: 0.8rem;
    margin-top: 8px;
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 12px;
    line-height: 1.5;
}

.user-message {
    align-self: flex-end;
    background-color: #dbeafe;
    border-bottom-right-radius: 4px;
    color: var(--dark);
}

.ai-message {
    align-self: flex-start;
    background-color: #f1f5f9;
    border-bottom-left-radius: 4px;
    color: var(--dark);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 500;
}

.chat-input-area {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: var(--primary);
}

.send-button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-button:hover {
    background-color: var(--primary-dark);
}

.warning-box {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 1rem;
    background-color: #f1f5f9;
    border-radius: 12px;
    width: fit-content;
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray);
    animation: typingAnimation 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingAnimation {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

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

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    main {
        padding: 0;
    }
    .container {
        padding: 0;
    }
    .tabber {
        flex-direction: column;
    }
    .select-info {
        text-align: center;
    }
    #history {
        margin: 1rem 0;
        font-size: 1rem;
    }
    .specialties-panel {
        border-radius: 0;
    }
    .specialties-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .message {
        max-width: 90%;
    }
}

