/* Firebase Messenger Chat Interface Styles */


.firebase-messenger-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    background: rgb(220 220 220 / 26%);
    border-radius: 0px;
    box-shadow: none;
    margin: 20px 0;
}

/* Sidebar Styles */
.chat-sidebar {
    width: 300px;
    border-right: 0;
    display: flex;
    flex-direction: column;
    background-color: rgb(220 220 220 / 26%);
}

.user-profile {
    padding: 15px;
    /* border-bottom: 1px solid #e0e0e0; */
    text-align: center;
}

.user-profile h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.role-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.conversations-list h4 {
    margin: 0 0 15px;
    padding: 0 10px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

/* Chat Main Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #efefef;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: url(../images/chat-box-bg.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
}

/* .chat-messages::before {
    content: "";
    position: absolute;
    background: #8080802b;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 9;
} */

/* Message Styles */
.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message-content {
    max-width: 70%;
    padding: 5px 15px;
    border-radius: 15px;
    position: relative;
}

.message.sent .message-content {
    align-self: flex-end;
    background: #1976d2;
    color: #fff;
    border-bottom-right-radius: 5px;
}

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

.message-text {
    margin-bottom: 0px;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.message.received .message-meta {
    color: #999;
}

.message-status {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    font-size: 12px;
    color: #999;
}

.message-status.read {
    color: #2196F3;
    /* Blue color for read messages */
}

.message-status i {
    font-size: 12px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.status-indicator.online {
    background-color: #4CAF50;
}

.status-indicator.offline {
    background-color: #999;
}

.patient-status,
.doctor-status {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
    line-height: normal;
}

.status-text {
    margin-left: 4px;
}

/* --- Cannabis Link Branding & Modern Chat Input --- */
:root {
    --brand-yellow: #FFD600;
    --brand-green: #4B6B50;
    --brand-gray: #f5f5f5;
    --brand-dark: #4B6B50;
}

.chat-input {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    /* background: rgb(220 220 220 / 26%); */
    padding: 12px 10px 10px 10px;
    /* border-top: 1px solid #e0e0e0; */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.input-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 30px;
    padding: 6px 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-action-btn {
    background: none;
    border: none;
    color: var(--brand-dark);
    font-size: 26px;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-action-btn:hover,
.input-action-btn.active {
    background: var(--brand-yellow);
    color: #222;
}

#message-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    padding: 8px 10px;
    margin: 0 6px;
}

.send-message {
    background: var(--brand-yellow);
    color: #222;
    border: none;
    font-size: 24px;
    padding: 10px 16px;
    border-radius: 50%;
    margin-left: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.send-message:disabled {
    background: #ccc;
    color: #fff;
    cursor: not-allowed;
}

/* Recording State */
.recording-bar {
    display: flex;
    align-items: center;
    background: var(--brand-yellow);
    border-radius: 30px;
    padding: 8px 16px;
    margin-top: 8px;
    gap: 12px;
    color: #222;
    font-weight: 600;
}

.recording-timer {
    font-size: 16px;
    font-weight: bold;
    color: var(--brand-dark);
}

.recording-send-btn {
    background: var(--brand-green);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 16px;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.recording-send-btn:hover {
    background: #388e3c;
}

/* Attachment Preview */
#attachment-preview {
    margin-top: 8px;
    padding: 8px;
    background: #fffbe7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-height: 40px;
    border: 1px solid #FFD600;
}

.attachment-thumb {
    width: 70px;
    height: 54px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #FFD600;
    background: #fff;
}

.attachment-info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #333;
    max-width: 140px;
    word-break: break-all;
}

.attachment-remove {
    background: none;
    border: none;
    color: #d32f2f;
    font-size: 22px;
    cursor: pointer;
    margin-left: 4px;
}

/* Audio Modal */
#audio-confirm-modal .modal-content {
    max-width: 350px;
    text-align: center;
}

#audio-preview {
    margin: 10px 0;
}

/* 19-06-2025-css */
.chat-sidebar .patient-item,
.chat-sidebar .doctor-item {
    background: #ffffff;
    border: 0;
    border-left: 4px solid transparent;
    border-radius: 5px;
    align-items: flex-start;
}

.chat-sidebar .patient-item.active,
.chat-sidebar .doctor-item.active,
.chat-sidebar .patient-item:hover,
.chat-sidebar .doctor-item:hover {
    background: #fff4dd;
    color: #000000;
    border: 0;
    border-left: 4px solid #ffd05a;
}

.chat-sidebar .doctor-info * {
    color: #000 !important;
    margin-bottom: 0;
    margin-left: 0;
}

.chat-sidebar .doctor-info .last-message {
    display: block;
    width: 100%;
}

.chat-sidebar .doctor-info {
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
}

.chat-sidebar .doctor-info .doctor-name {
    margin: 0;
    padding: 0;
}

.chat-sidebar .last-message-time {
    color: #000;
}

.chat-main .message.sent .message-content {
    background: #ffecb7;
    color: #000000;
    border: 0;
}

.message.sent .message-content {
    border-bottom-right-radius: 0;
}

.message.received .message-content {
    border-bottom-left-radius: 0;
    background: #fff !important;
    border-color: #fff !important;
}

.chat-main .message.sent .message-time {
    color: #000;
}

.chat-main .message.sent .message-status {
    margin-left: 10px;
}

.chat-main .message.sent .message-status i {
    font-size: 10px;
}

.chat-main .chat-header {
    background: #ffd24b;
}

.chat-main .chat-header h3 {
    color: #000000;
    text-transform: uppercase;
}
.chat-main .input-action-btn svg,
.chat-main .send-message svg {
    filter: brightness(0);
    width: 28px;
    height: 28px;
}

.chat-main .send-message {
    height: 50px;
    width: 50px;
    padding: 10px;
}

.chat-sidebar span.role-badge {
    background: #ffd436;
    color: #000000;
    padding: 2px 10px;
}

.conversations-list h4 {
    color: #000;
    position: relative;
}

.conversations-list>h4::before {
    content: "";
    position: absolute;
    border-bottom: 1px solid #000;
    width: 60%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

form#file-upload-form input {
    padding: 10px 15px;
    min-height: auto;
    background: #EBEEF0;
    border: 1px solid #ccc;
    border-radius: 3px;
}

div#file-upload-modal span.close,
div#audio-recorder-modal span.close {
    color: #000;
    font-size: 30px;
    top: 10px;
    right: 10px;
    transition: 0.3s;
}

div#file-upload-modal span.close:hover,
div#audio-recorder-modal span.close:hover {
    color: #ffd05a;
}

.chat-sidebar .doctor-item .doctor-avatar {
    margin-top: 8px;
}

.message.received .message-content {
    background: #fff5db;
    border: 1px solid #ffd66e;
}

div#file-upload-modal form button[type^="submit"] {
    width: 100%;
    border: none;
}

div#audio-recorder-modal .record-button,
div#audio-recorder-modal .stop-button {
    width: 100%;
    height: 40px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    padding: 8px;
    border: none;
    text-align: center;
    justify-content: center;
}

.message.received .message-content .message-meta {
    color: #000;
}

.message.received .message-content .message-text {
    color: #000;
}

#send-audio-btn,
#cancel-audio-btn {
    border: none;
}

div#file-upload-modal form button[type^="submit"]:hover {
    background: #ffd05a;
    color: #000;
}

.default-message-screen {
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column-reverse;
    text-align: center;
    position: relative;
    z-index: 9;
}

.default-message-screen svg {
    width: 80px;
    height: 80px;
    filter: brightness(0) saturate(100%) invert(82%) sepia(97%) saturate(653%) hue-rotate(317deg) brightness(101%) contrast(105%);
    margin-bottom: 20px;
}

.default-message-screen p {
    font-size: 20px;
    font-weight: 500;
}

.chat-sidebar .patient-item.active .patient-name {
    color: #000;
}

.chat-sidebar .patient-item.active .last-message {
    color: #000;
}

.chat-sidebar .patient-item .patient-name,
.chat-sidebar .patient-item .last-message {
    margin: 0;
    padding: 0;
    line-height: normal;
}

.chat-main .message .message-status i:last-child {
    position: relative;
    right: 7px;
}

.attachment-download {
    color: #000000;
    font-size: 12px;
    background: url(/wp-content/themes/merto-child/images/download-icon.svg);
    background-repeat: no-repeat;
    background-size: 16px;
    padding-left: 22px;
    display: block;
    line-height: 18px;
    margin: 5px 0;
}

.attachment-download:hover {
    filter: brightness(0) saturate(100%) invert(66%) sepia(58%) saturate(5964%) hue-rotate(23deg) brightness(93%) contrast(102%);
    color: #b58200;
}

.message-attachment .attachment-audio {
    margin-right: 15px;
}

.chat-main .message-form .send-message {
    margin: 0;
}

.chat-main .message-form .send-message:hover {
    background: #f2c626;
}

form#file-upload-form {
    border: 2px dashed #ffd24b;
    padding: 10px 15px;
    min-height: auto;
    border-radius: 10px;
    text-align: center;
    overflow-y: auto;
    max-height: 320px;
}

form#file-upload-form .dz-filename span {
    width: 95px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 50px;
}

div#audio-confirm-modal h3 {
    text-align: left;
}

div#audio-confirm-modal span.close {
    color: #000;
    font-size: 30px;
    top: 10px;
    right: 10px;
    transition: 0.3s;
}

div#audio-confirm-modal span.close:hover {
    color: #ffd05a;
}

/* --- End Branding & Input --- */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

/* File Upload Modal */


.file-upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-input-container {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-input-container:hover {
    border-color: #2196F3;
}

.file-input {
    display: none;
}

.upload-button {
    background-color: #2196F3;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.upload-button:hover {
    background-color: #1976D2;
}

/* Audio Recorder Modal */
#audio-recorder-modal .modal-content {
    max-width: 400px;
}

.recording-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.record-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s;
}

/* Audio Confirm Modal */
#audio-confirm-modal .modal-content {
    max-width: 400px;
}

.audio-preview {
    margin: 20px 0;
    text-align: center;
}

.audio-preview audio {
    width: 100%;
    max-width: 300px;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.confirm-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#send-audio-btn {
    background-color: #4CAF50;
    color: white;
}

#cancel-audio-btn {
    background-color: #f44336;
    color: white;
}

#send-audio-btn:hover {
    background-color: #2f9b34;
}

#cancel-audio-btn:hover {
    background-color: #cf2417;
}

/* Upload Progress */
.upload-progress {
    position: fixed;
    bottom: 20px;
    right: 50%;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(50%);
    min-width: 550px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background-color: #ffd24b;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Attachment Preview */
.attachment-preview {
    display: none;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.attachment-thumb {
    max-width: 50px;
    max-height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.attachment-info {
    flex: 1;
    font-size: 14px;
    color: #666;
}

#attachment-preview .attachment-item {
    position: relative;
}

.attachment-remove {
    border: none;
    color: #f44336;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 14px;
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ffe275;
    width: 16px;
    height: 16px;
}

.attachment-remove:hover {
    color: #d32f2f;
}


.firebase-error {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff4444;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    text-align: center;
    max-width: 80%;
}

/* --- Responsive & Modern Messenger Improvements --- */

/* Sidebar user list item improvements */
.patient-item,
.doctor-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.patient-item.active,
.doctor-item.active {
    background: #e3f2fd;
}

.patient-avatar,
.doctor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
    background-color: #f0f0f0;
}

.patient-info,
.doctor-info {
    flex: 1;
    min-width: 0;
}

.patient-name,
.doctor-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-message {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.patient-meta,
.doctor-meta {
    text-align: right;
    min-width: 60px;
    position: relative;
}

.last-message-time {
    font-size: 11px;
    color: #aaa;
}

/* Highlight active chat in sidebar */
.patient-item.active,
.doctor-item.active {
    background: #1976d2;
    color: #fff;
}

.patient-item.active .patient-name,
.patient-item.active .last-message,
.doctor-item.active .doctor-name,
.doctor-item.active .last-message {
    color: #fff;
}

/* Doctor online status */
.doctor-status {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 12px;
}

.doctor-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.doctor-status .online {
    background-color: #4CAF50;
}

.doctor-status .offline {
    background-color: #999;
}

.doctor-status .in-consultation {
    background-color: #FFA000;
}

.doctor-status .status-text {
    color: #666;
}

.doctor-item.active .doctor-status .status-text {
    color: #fff;
}

.dz-progress {
    display: none;
}

.dropzone .dz-preview .dz-remove {
    position: absolute;
    top: -6px;
    right: -4px;
    display: block;
    z-index: 15;
    font-size: 10px !important;
    background: #000;
    color: #fff;
    padding: 0;
    width: 22px;
    height: 22px;
    border-radius: 10px;
    cursor: pointer;
}

.dropzone .dz-preview .dz-remove img {
    filter: brightness(0) invert(1);
}

.dropzone .dz-preview .dz-details {
    z-index: 10 !important;
}


.firebase-messenger-container div#doctor-notes-section {
    margin-top: 0 !important;
    border-radius: 0 !important;
    height: 100% !important;
    width: 400px;
}

div#doctor-notes-section div#doctor-notes-toolbar button {
    padding: 3px 10px;
    background: #ffecb7;
    border: 0;
    color: #000;
}

div#doctor-notes-section div#doctor-note-text {
    min-height: calc(100% - 200px) !important;
}

div#doctor-notes-section {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: rgb(220 220 220 / 26%) !important;
    border: 0 !important;
}

div#doctor-note-text {
    width: 100%;
}

.woocommerce-account .page-container {
    max-width: 100% !important;
    padding-left: 40px;
    padding-right: 40px;
}

.firebase-messenger-container .chat-sidebar .user-profile {
    text-align: left;
}

.firebase-messenger-container .chat-sidebar .user-profile h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.chat-sidebar .patient-item span.unread-count,
.chat-sidebar .doctor-item span.unread-count {
    position: absolute;
    top: 30px;
    right: 0;
    width: 20px;
    height: 20px;
    line-height: normal;
}

.unread-count {
    display: inline-block !important;
    min-width: 18px;
    min-height: 18px;
    background: #ffd05a !important;
    color: #000 !important;
    border-radius: 10px;
    padding: 2px 7px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    margin-left: 8px;
    box-sizing: border-box;
}

.unread-count:empty {
    display: none !important;
}

div#doctor-notes-section label {
    padding-bottom: 0;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 1 !important;
}

.lightbox {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}

.lightbox img.lb-image {
    min-width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.lightbox .lb-outerContainer {
    min-width: 920px;
    min-height: 700px;
}

.lightbox .lb-outerContainer .lb-container {
    width: 100% !important;
    height: 100% !important;
}

.dropzone.dz-clickable .dz-message {
    position: relative;
    margin-top: 5rem;
}

.dropzone.dz-clickable .dz-message::before {
    content: "";
    position: absolute;
    background: url(../images/upload.png);
    width: 50px;
    height: 50px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    filter: brightness(0) saturate(100%) invert(97%) sepia(86%) saturate(1601%) hue-rotate(318deg) brightness(102%) contrast(100%);
}

button#dropzone-upload-btn {
    background: #ffc233;
    border: 0;
    color: #000;
}

button#dropzone-upload-btn:hover {
    background: #ffd05a;
}

.dropzone .dz-preview.dz-image-preview .dz-details {
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input form#message-form {
    display: flex;
    flex-direction: column-reverse;
    row-gap: 5px;
}

.information-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

.information-control .dr-prescription {
    grid-column: span 3;
}

.firebase-messenger-container button#save-doctor-note {
    margin-left: auto;
}

div#prescriptionModal .modal-dialog.modal-lg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

div#prescriptionModal .modal-dialog.modal-lg .modal-content {
    margin: 0;
}

div.modal .modal-dialog button.close {
    background: transparent;
    padding: 0;
    border: 0;
    font-size: 30px;
    margin-top: 10px;
    color: #000;
    font-family: 'Font Awesome 5 Free';
    cursor: pointer;
}

div.model .modal-dialog button.close:hover {
    color: #feca67;
}

div#prescriptionModal form#prescriptionForm label {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 5px;
}

div#prescriptionModal form#prescriptionForm input {
    height: 45px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 18px;
}

div#prescriptionModal form#prescriptionForm textarea {
    height: 100px;
    margin-bottom: 12px;
}

.default-question ul li {
    list-style: none;
    color: #000;
    background: #fff;
    margin-block-start: 10px;
    width: fit-content;
    padding: 7px 15px !important;
    border-radius: 15px;
    border-bottom-left-radius: 0;
    font-size: 14px;
}

.ui-autocomplete {
    z-index: 99999 !important;
    position: absolute !important;
    background: #fff;
    border: 1px solid #ccc;
    padding: 5px 0;
    font-size: 14px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ui-menu-item {
    padding: 8px 15px;
    cursor: pointer;
}

.ui-menu-item:hover {
    background: #f0f0f0;
}

div#prescriptionModal .modal-dialog .modal-content {
    width: 100%;
    max-width: 750px;
    max-height: 600px;
    overflow-y: auto;
}


div#prescriptionModal .modal-dialog.modal-lg .modal-content form#prescriptionForm .medication-group hr {
    border-bottom: 1px solid;
    margin: 0;
    margin-bottom: 20px;
    margin-top: 30px;
}

.certificate-warning {
    text-align: center;
    max-width: 700px;
    margin: auto;
}

.canabis-verification-form .success-message-fail,
.certificate-warning p {
    background: #ffd24b;
    padding: 8px;
    text-align: center;
    font-size: 15px;
    margin-top: 20px;
}

.medication-group {
    display: flex;
    justify-content: space-between;
}

.prescription-loader,
.verification-loader,
.cb-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0000008a;
    border-radius: 0;
    z-index: 99999;
    width: 100%;
    height: 100%;
}

.prescription-loader img,
.verification-loader img,
.cb-loader img {
    height: 80px !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffdb96d6;
    border-radius: 200px;
}

div#prescriptionModal .modal-dialog .modal-content .modal-footer {
    margin-top: 20px;
}

div#prescriptionModal form#prescriptionForm textarea {
    height: auto;
    font-size: 14px;
    line-height: 18px;
}

.ui-autocomplete {
    padding: 0 !important;
}

.ui-autocomplete li.ui-menu-item {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ui-autocomplete li.ui-menu-item .ui-menu-item-wrapper {
    display: block;
    padding: 10px;
    border: none !important;
}

.ui-autocomplete li.ui-menu-item:hover .ui-menu-item-wrapper,
.ui-autocomplete li.ui-menu-item .ui-menu-item-wrapper:hover,
.ui-autocomplete li.ui-menu-item .ui-menu-item-wrapper.ui-state-active {
    background: #feca67 !important;
    color: #000 !important;
}

.user-info-form .form-field .regular-select {
    width: 100%;
    max-width: 100%;
    border-color: #ebeef0;
}
.firebase-messenger-container .chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.firebase-messenger-container form#cancel-form textarea {
    background: #fff;
}

.firebase-messenger-container form#cancel-form label {
    font-size: 20px;
    font-weight: 600;
}

.no-record-found {
    background: #ffd24b;
    padding: 8px;
    text-align: center;
    font-size: 15px;
    margin: auto;
    margin-top: 20px;
    width: 100%;
    max-width: 500px
}

.woocommerce-account.logged-in .dataTables_wrapper label {
    display: flex;
    align-items: center;
    text-transform: capitalize;
} 
.woocommerce-account.logged-in .dataTable tr th {
    text-align: center;
}

.delete-message {
    background: #3b7002;
    color: #fff;
    padding: 5px 15px;
}

div#survey-content {
    height: 400px;
    overflow-y: auto;
}

div#survey-modal .survay-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 550px;
    width: 100%;
    position: relative;
}

div#survey-modal span#close-modal {
    font-size: 30px;
    top: 12px;
    position: absolute;
    right: 15px;
    cursor: pointer;
    transition: 0.3s;
}

div#survey-modal span#close-modal:hover {
    color: #ffd05a;
}


div#survey-modal h2 {
    font-size: 24px;
    margin: -10px 0px 10px 0;
}


.pat-wait-sec {
    background-color: #abd7dc;
    width: 100%;
    max-width: 100%;
}
.pat-wait-sec img.waiting-room-img {
    max-width: 50%;
    margin: auto;
}




.create-prescription-wrap .left-panel {
        flex: 1;
        border-right: 2px solid #ccc;
        padding: 20px;
    }
    .create-prescription-wrap form#prescriptionForm {
        display: flex;
        width: 100%;
    }
    .create-prescription-wrap .left-panel h2 {
      margin-top: 0;
      font-size: 20px;
      font-weight: bold;
    }

    .create-prescription-wrap .left-panel label {
      display: block;
      margin: 12px 0 5px;
      font-weight: bold;
    }

    .create-prescription-wrap .left-panel input,
    .create-prescription-wrap .left-panel textarea {
      width: 100%;
      padding: 10px;
      border: 1px solid #aaa;
      border-radius: 4px;
      font-size: 14px;
    }

    .create-prescription-wrap .left-panel textarea {
      min-height: 80px;
      resize: vertical;
    }

    .create-prescription-wrap .submit-btn {
      margin: 20px auto 0;
      padding: 12px 25px;
      border: none;
      font-size: 16px;
      font-weight: bold;
      background: #efc150;
      color: #000000;
      cursor: pointer;
      transition: background 0.3s;
      border-radius: 8px;
    }

    .create-prescription-wrap .submit-btn:hover {
      background-color: #000000;
      color: #fff;
    }

    /* Right side cards */
   .create-prescription-wrap .right-panel {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    position: relative;
    height: 430px;
    overflow: auto;
}
div#prescriptionModal .modal-dialog .modal-content .modal-footer div#medication-error {
    text-align: center;
}
.create-prescription-wrap p.add-med-info {
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    top: 0;
    bottom: 0;
    text-align: center;
    font-size: 14px;
    padding: 5px 10px;
    max-width: max-content;
    max-height: fit-content;
    margin-top: 30px;
    background-color: #efc150;
    border-radius: 4px;
}
.create-prescription-wrap p.med-err {
    color: red;
    margin-top: 5px;
}
    .create-prescription-wrap .card {
      position: relative;
      background: #fff;
      border-radius: 10px;
      padding: 15px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      height: max-content;
      word-break: break-all;
    }

    .create-prescription-wrap .card img.medicine-icon {
      width: 40px;
      display: block;
      margin-bottom: 10px;
    }

    .create-prescription-wrap .card h3 {
      margin: 0;
      font-size: 16px;
      font-weight: bold;
    }

    .create-prescription-wrap .card p {
      margin: 5px 0;
      font-size: 14px;
    }

    .create-prescription-wrap .card .instructions {
      font-size: 13px;
      margin-top: 5px;
    }

    .create-prescription-wrap .remove-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 28px;
      height: 28px;
      padding: 10px;
      border-radius: 50%;
      background: red;
      color: #fff;
      font-size: 16px;
      border: none;
      cursor: pointer;
      font-weight: bold;
      display: flex;
      align-items: center;
      justify-content: center;
    }
.create-prescription-wrap {
    display: flex;
}
div#prescriptionModal .modal-dialog .modal-content {
    max-width: 900px;
    margin: auto;
}
.create-prescription-wrap .custom-select .select-selected {
    border: 1px solid #aaa;
    border-radius: 4px;
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 12px !important;
}
.create-prescription-wrap .custom-select {
    width: 100%;
}
.create-prescription-wrap .custom-select .select-selected img {
    margin-right: 10px !important;
    display: inline-block;
}
.create-prescription-wrap .form-group label {
    margin: 0;
    color: #000;
    opacity: 1;
}
div#prescriptionModal .modal-footer button#createPdf:disabled {
    pointer-events: none;
    opacity: .5;
}
.fb-med-wrap {
    display: flex;
    margin: 5px 0px;
}
.fb-med-wrap img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 10px;
}

.ur-frontend-form .ur-form-row .ur-form-grid div#phone_number_field span.input-wrapper:before {
    content: "+55";
    position: absolute;
    top: 10px;
    left: 5px;
    color: #ffffff;
    z-index: 1;
}
.ur-frontend-form .ur-form-row .ur-form-grid div#phone_number_field span.input-wrapper:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    background: #575c5e;
    width: 36px;
    height: 100%;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
.ur-frontend-form .ur-form-row .ur-form-grid div#phone_number_field span.input-wrapper {
    position: relative;
}

.ur-frontend-form .ur-form-row .ur-form-grid div#phone_number_field  input#phone_number {
    padding: 0px 14px 0px 45px;
}

/* Responsive layout */

@media (max-width:1536px) {
    .chat-messages {
        margin-bottom: 10px;
    }
}

@media (max-width: 1199px) {
    .firebase-messenger-container .chat-header {
        flex-wrap: wrap;
    }

}

@media (max-width: 900px) {
    .firebase-messenger-container {
        flex-direction: column;
        height: auto;
        min-height: 400px;
    }
    div#prescriptionModal .modal-header h5.modal-title {
        font-size: 20px !important;
    }
    .create-prescription-wrap .left-panel .form-group select, .create-prescription-wrap .left-panel .form-group input, .create-prescription-wrap .left-panel .form-group textarea {
    margin-bottom: 0 !important;
}
    .create-prescription-wrap .left-panel h2 {
    display: none;
}
    .create-prescription-wrap form#prescriptionForm {
    flex-direction: column;
}
.create-prescription-wrap .right-panel {
    flex: 1;
    padding: 0 10px;
    grid-template-columns: repeat(1, 1fr);
    height: max-content !important;
    overflow: unset;
}
div#prescriptionModal .form-group {
    margin-bottom: 12px !important;
}
.create-prescription-wrap .left-panel {
    padding: 0px 10px;
    margin-bottom: 20px;
}

    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        flex-direction: row;
        overflow-x: auto;
        min-height: 70px;
        max-height: 120px;
    }

    .conversations-list {
        flex: 1;
        padding: 5px;
        overflow-x: auto;
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .patient-item,
    .doctor-item {
        min-width: 180px;
        margin-right: 8px;
    }

    .conversations-list div#patients-list,
    .conversations-list div#doctors-list {
        overflow-x: auto;
        display: flex;
        overflow-y: hidden;
        height: 110px;
    }

    div#doctor-notes-section {
        width: 100%;
    }

    .conversations-list>h4::before {
        display: none;
    }

}

@media (max-width: 768px) {
    .firebase-messenger-container {
        flex-direction: column;
        height: calc(100vh - 100px);
    }
    .pat-wait-sec img.waiting-room-img {
        max-width: 100%;
        margin: auto;
    }

    .chat-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .chat-main {
        height: calc(100% - 340px);
    }

    div#doctor-notes-section {
        width: 100%;
    }

    div#doctor-notes-section div#doctor-note-text {
        min-height: 120px !important;
    }

}

@media(max-width: 767px) {

    .conversations-list div#patients-list,
    .conversations-list div#doctors-list {
        width: 100%;
    }

    .chat-main .message.sent .message-content {
        max-width: 100%;
    }

    .message.received .message-content {
        max-width: 100%;
    }

    .user-profile h3 {
        font-size: 10px;
        margin: 0;
        line-height: 16px;
        text-align: center;
    }

    .user-profile span.role-badge {
        position: absolute;
        bottom: -28px;
        font-size: 10px;
        text-transform: uppercase;
        background: transparent;
        font-weight: 600;
        padding: 0px 4px;
        left: 0;
    }

    .user-profile {
        background: #ffd05a;
        border: 3px solid #ffba28;
        border-radius: 100px;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        padding: 5px;
        position: relative;
    }

    .chat-sidebar .conversations-list>h4 {
        display: none;
    }

    .chat-sidebar .patient-item,
    .chat-sidebar .doctor-item {
        min-width: 50px;
        padding: 2px;
        width: 50px;
        height: 50px;
        background: #fff;
        border: 2px solid #dddddd;
        border-radius: 100px;
        margin: 0 10px 0 0px;
        position: relative;
    }

    .chat-sidebar .doctor-info .last-message,
    .chat-sidebar .patient-info .last-message,
    .chat-sidebar .patient-info .patient-status,
    .chat-sidebar .doctor-info .doctor-status,
    .patient-meta,
    .doctor-meta {
        display: none;
    }

    .chat-sidebar .patient-info,
    .chat-sidebar .doctor-info {
        position: absolute;
        bottom: -25px;
        left: 10px;
        margin: 0;
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    .chat-sidebar .patient-info {
        left: 0;
    }

    .chat-sidebar .doctor-item .doctor-avatar,
    .chat-sidebar .patient-item .patient-avatar {
        margin: 0;
        width: 100%;
        height: 100%;
    }

    .chat-sidebar .doctor-info .doctor-name,
    .chat-sidebar .patient-item .patient-name {
        font-size: 10px;
    }

    .conversations-list {
        padding: 0 10px;
        gap: 0;
        /* height: 110px; */
        overflow-y: hidden;
    }

    .chat-sidebar {
        min-height: 80px;
        max-height: 80px;
        display: flex;
        align-items: flex-start;
        overflow-y: hidden;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-left: 10px;
        padding-right: 10px;
    }


    .chat-sidebar .patient-item .patient-name {
        width: 70%;
        margin-left: 0px;
        margin-bottom: 1px;
        min-width: 40px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        margin-bottom: 0px;
    }

    div#file-upload-modal h3,
    div#audio-recorder-modal h3 {
        font-size: 18px;
        text-transform: uppercase;
    }

    .firebase-messenger-container .chat-sidebar .user-profile h3 {
        font-size: 10px;
        margin-bottom: 0;
        line-height: 1.4;
    }

    .patient-avatar,
    .doctor-avatar {
        border-radius: 100%;
    }

    .chat-main .chat-header h3 {
        font-size: 14px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        margin-bottom: 10px !important;
        margin-top: 0 !important;
        gap: 5px 10px !important;

    }

    .chat-sidebar .patient-item.active,
    .chat-sidebar .doctor-item.active,
    .chat-sidebar .patient-item:hover,
    .chat-sidebar .doctor-item:hover {
        background: #fff4dd;
        color: #000000;
        border: 2px solid #ffd05a !important;
    }

    .chat-main .input-action-btn svg,
    .chat-main .send-message svg {
        width: 22px;
        height: 22px;
    }

    .input-actions {
        gap: 5px;
    }

    .firebase-messenger-container {
        height: fit-content;
    }

    .default-message-screen {
        position: absolute;
        top: 50%;
        align-self: center;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
    }

    div#doctor-notes-section button#save-doctor-note {
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .chat-messages {
        min-height: calc(100vh - 260px) !important;
        max-height: calc(100vh - 260px);
    }

    .chat-sidebar .doctor-info {
        left: 0 !important;
    }

    .chat-sidebar .doctor-info h4.doctor-name {
        width: 70%;
        margin-left: 0px;
        margin-bottom: 1px;
        line-height: normal;
        font-weight: 600;
    }

    div#prescriptionModal form#prescriptionForm label {
        font-size: 14px;
        margin-bottom: 0px;
    }

    div#prescriptionModal .modal-dialog.modal-lg .modal-content {
        width: 90%;
        padding: 15px;
    }

    div#prescriptionModal form#prescriptionForm input {
        height: 40px;
    }

    div#prescriptionModal form#prescriptionForm textarea {
        height: 60px;
    }

    div#doctor-notes-section .dr-prescription {
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 15px;
        padding-right: 15px;
    }

    div#prescriptionModal form#prescriptionForm input,
    div#prescriptionModal form#prescriptionForm textarea {
        padding: 10px !important;
    }

    .medication-group {
        flex-wrap: wrap;
    }

    .medication-group .form-group {
        width: 95%;
    }

    .medication-group .remove-med-btn.form-group {
        width: 4%;
        margin-left: 2px;
    }

    div#survey-modal .survay-info {
        width: 90%;
    }

    div#survey-modal h2 {
        font-size: 20px;
        margin: -10px 0px 10px 0;
    }
}

@media (max-width: 600px) {
    .chat-input {
        padding: 6px 2px 6px 2px;
    }

    .input-bar {
        padding: 4px 4px;
    }

    .send-message {
        font-size: 22px;
        padding: 8px 10px;
    }

    .input-action-btn {
        font-size: 22px;
    }

    .firebase-messenger-container {
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        min-height: auto;
    }

    .chat-main {
        padding: 0;
    }

    .chat-header {
        padding: 10px 8px;
    }

    .chat-messages {
        padding: 10px 4px;
    }

    .chat-input {
        padding: 8px 4px;
    }

    .patient-item,
    .doctor-item {
        min-width: 140px;
        padding: 8px 6px;
    }

    .patient-avatar,
    .doctor-avatar {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }

    #audio-recorder-modal .modal-content,
    #file-upload-modal .modal-content,
    #audio-confirm-modal .modal-content {
        max-width: 400px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .default-message-screen p {
        font-size: 16px;
        font-weight: 500;
    }

    .default-message-screen svg {
        width: 60px;
        height: 60px;
    }

    .dropzone .dz-preview .dz-image {
        width: 80px !important;
        height: 80px !important;
    }

    .dropzone .dz-preview.dz-image-preview {
        margin: 10px;
    }

    .chat-input div#attachment-preview {
        width: 98%;
    }

}





/* Truncate last message preview to 15 words in JS, but ensure ellipsis in CSS */

/* --- End Messenger Improvements --- */

/* Add this at the end of the file or in a suitable place */