/* Chat Styles for the D r P Scheduling Assistant */

.schedule-section {
    padding: 100px 0 80px;
    min-height: calc(100vh - 80px);
}

.schedule-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.schedule-info {
    flex: 1;
    min-width: 300px;
}

.chat-container {
    flex: 2;
    min-width: 350px;
    background: rgba(10, 10, 26, 0.8);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    height: 500px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-container:hover {
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.3);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(10, 10, 26, 0.95);
    border-bottom: 1px solid var(--card-border);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--text-light);
}

.chat-title i {
    color: var(--secondary-color);
}

.chat-controls button {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.chat-controls button:hover {
    color: var(--secondary-color);
}

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

.message {
    display: flex;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
}

.message.assistant {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
    background: var(--primary-gradient);
    border-top-right-radius: 4px;
    color: var(--text-light);
}

.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.08);
    border-top-left-radius: 4px;
    color: var(--text-medium);
}

.message p {
    margin: 0;
    line-height: 1.4;
}

.message.typing .message-content {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typingAnimation 1s infinite;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(10, 10, 26, 0.95);
    border-top: 1px solid var(--card-border);
}

.chat-input textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 12px 15px;
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input textarea:focus {
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.12);
}

.chat-input button {
    background: var(--secondary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: scale(1.05);
    background: var(--primary-gradient);
}

.chat-input button:active {
    transform: scale(0.95);
}

.chat-input button i {
    font-size: 1rem;
}

/* Info Card Styles */
.info-card, 
.availability-highlights {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
}

.info-card h3,
.availability-highlights h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-weight: 600;
}

.schedule-steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.schedule-steps li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-text {
    margin-top: 5px;
    color: var(--text-medium);
}

.availability-highlights ul {
    margin: 15px 0;
}

.availability-highlights li {
    margin-bottom: 10px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 10px;
}

.availability-highlights i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.note {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .schedule-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .schedule-info {
        min-width: unset;
    }
    
    .chat-container {
        min-width: unset;
        height: 60vh;
        min-height: 450px;
        max-height: 600px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-input {
        padding: 15px;
    }
    
    .chat-input textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
    }
    
    .info-card, 
    .availability-highlights {
        padding: 20px;
    }
}

/* Mobile optimizations for smaller screens */
@media (max-width: 480px) {
    .chat-container {
        height: 70vh;
        min-height: 400px;
        border-radius: 8px;
    }
    
    .chat-header h3 {
        font-size: 1rem;
    }
    
    .chat-input {
        padding: 12px;
        gap: 8px;
    }
    
    .chat-input textarea {
        padding: 10px 12px;
        min-height: 40px;
    }
    
    .chat-input button {
        padding: 10px 16px;
    }
    
    .message-content {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .typing-indicator {
        padding: 6px 12px;
    }
    
    /* Adjust info sections on mobile */
    .schedule-steps li {
        gap: 12px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .step-text {
        font-size: 0.9rem;
    }
}

/* Additional animation for chat messages */
.message {
    animation: message-pop 0.3s ease-out;
    transform-origin: bottom;
}

@keyframes message-pop {
    0% { 
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}