/*
 * ===============================================
 * Patient Message View Component Styles
 * ===============================================
 */

#patient-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#patient-message-modal .modal-container {
    max-width: 600px;
    width: 90vw;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 75vh;
    max-height: 550px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: hidden;
}

#patient-message-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

#patient-message-modal .modal-header h2 {
    margin: 0;
    font-size: 1.2em;
}

#patient-message-modal .modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

#patient-message-list {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f8fafc;
    min-height: 0;
}

.patient-message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
}

.patient-message-bubble .message-text {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.patient-message-bubble .message-meta {
    font-size: 0.7em;
    color: #64748b;
    margin-top: 5px;
    text-align: right;
    opacity: 0.8;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.patient-message-bubble.sent {
    background-color: #4f46e5;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.patient-message-bubble.sent .message-meta {
    color: rgba(255, 255, 255, 0.75);
}

.patient-message-bubble.received {
    background-color: #e2e8f0;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.patient-message-list-empty {
    text-align: center;
    color: #94a3b8;
    margin: auto;
}

#patient-message-modal .modal-footer {
    display: flex;
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    gap: 10px;
    align-items: flex-start;
    flex-shrink: 0;
    background-color: #ffffff;
}

#patient-message-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    resize: none;
    min-height: 120px; /* Increased from 44px to show ~6 lines */
    max-height: 200px; /* Increased from 150px for more expansion room */
    font-family: inherit;
    font-size: 1em;
    line-height: 1.5;
    overflow-y: auto;
    overflow-x: hidden;
}

#patient-send-message-btn {
    flex-shrink: 0;
    height: 44px;
}

.read-indicator {
    margin-left: 8px;
    font-weight: 600;
    font-size: 0.9em;
    opacity: 0.9;
}