/* Main container */
.beds24-messages {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    width: 100%;
}

/* Error messages */
.beds24-error {
    color: #721c24;
    padding: 12px 15px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Debug information */
.beds24-debug {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 13px;
}

.beds24-debug pre {
    white-space: pre-wrap;
    margin: 0;
    overflow-x: auto;
}

/* No messages notice */
.beds24-no-messages {
    padding: 15px;
    border: 1px solid #d6d8db;
    background-color: #e9ecef;
    border-radius: 4px;
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
}

/* View Toggle Buttons */
.beds24-view-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.beds24-view-toggle span {
    font-weight: 600;
    margin-right: 5px;
}

.beds24-view-button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
}

.beds24-view-button:hover {
    background-color: #e9ecef;
}

.beds24-view-button.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Search bar */
.beds24-search-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.beds24-search-container label {
    margin-right: 10px;
    font-weight: 600;
}

.beds24-search-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    flex-grow: 1;
    margin-right: 5px;
}

.beds24-search-button {
    background-color: #343a40;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.beds24-search-button:hover {
    background-color: #23272b;
}

/* Status colors for property rows - with !important to ensure they take precedence */
.beds24-status-open {
    background-color: #f8d7da !important; /* Light red for open/unread messages */
    border-left: 4px solid #dc3545 !important; /* Red border for emphasis */
}

.beds24-status-pending {
    background-color: #fff3cd !important; /* Light orange/tan for pending responses */
    border-left: 4px solid #ffc107 !important; /* Amber border for emphasis */
}

.beds24-status-closed {
    background-color: #d4edda !important; /* Light green for closed threads */
    border-left: 4px solid #28a745 !important; /* Green border for emphasis */
}

/* Tree View Styles */
.beds24-property {
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Property header layout */
.beds24-property-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.beds24-property-name {
    margin: 0;
    font-size: 1.1em;
    color: #212529;
    font-weight: 600;
    min-width: 180px;
}

.beds24-last-message {
    flex-grow: 1;
    color: #495057;
    font-size: 0.9em;
}

.beds24-message-count {
    background-color: rgba(0,0,0,0.1);
    color: #495057;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 10px;
    font-weight: normal;
}

.beds24-toggle-property {
    width: 24px;
    height: 24px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.beds24-toggle-property:hover {
    background-color: #dee2e6;
}

/* Status indicators */
.beds24-status-indicator {
    display: flex;
    align-items: center;
    margin-left: 10px;
    font-size: 0.9em;
    font-weight: 500;
}

.beds24-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    display: inline-block;
}

.beds24-status-dot-red {
    background-color: #dc3545; /* Red */
}

.beds24-status-dot-green {
    background-color: #28a745; /* Green */
}

.beds24-status-dot-amber {
    background-color: #ffc107; /* Amber */
}

.beds24-property-messages {
    padding: 15px;
    background-color: white;
}

/* List View Styles */
.beds24-messages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Common Message Styles */
.beds24-message {
    margin-bottom: 15px;
    padding: 0;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    background-color: #ffffff;
}

.beds24-tree-view .beds24-message {
    margin-bottom: 15px;
}

.beds24-message-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.beds24-message-date {
    color: #6c757d;
    font-size: 0.85em;
}

.beds24-message-from {
    font-weight: 600;
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

/* Message source styling */
.beds24-message-from.guest {
    background-color: #cff4fc;
    color: #055160;
}

.beds24-message-from.host {
    background-color: #d1e7dd;
    color: #0f5132;
}

.beds24-message-from.system {
    background-color: #fff3cd;
    color: #664d03;
}

.beds24-message-from.internalnote {
    background-color: #e2e3e5;
    color: #41464b;
}

.beds24-property-info {
    font-weight: normal;
    font-style: italic;
}

.beds24-message-content {
    padding: 15px;
    line-height: 1.5;
    color: #212529;
    background-color: #ffffff;
    word-wrap: break-word;
}

.beds24-message-content a {
    color: #0d6efd;
    text-decoration: none;
}

.beds24-message-content a:hover {
    text-decoration: underline;
}

/* Admin styles */
.beds24-connection-result {
    margin-top: 15px;
    padding: 15px;
}

/* Booking details styling */
.beds24-booking-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    font-size: 0.85em;
}

.beds24-booking-status,
.beds24-booking-channel,
.beds24-booking-dates {
    padding: 2px 8px;
    border-radius: 12px;
    background-color: #f0f0f0;
    color: #333;
}

/* Status-specific colors */
.beds24-status-confirmed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.beds24-status-request, 
.beds24-status-new {
    background-color: #fff3cd;
    color: #664d03;
}

.beds24-status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.beds24-status-black,
.beds24-status-inquiry {
    background-color: #e2e3e5;
    color: #41464b;
}

.beds24-booking-channel {
    background-color: #d1ecf1;
    color: #0c5460;
}

.beds24-booking-dates {
    background-color: #cfe2ff;
    color: #084298;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .beds24-property-header {
        flex-wrap: wrap;
    }
    
    .beds24-property-name {
        margin-bottom: 8px;
    }
    
    .beds24-message-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .beds24-message-date {
        margin-bottom: 5px;
    }
    
    .beds24-view-toggle {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .beds24-view-toggle span {
        margin-bottom: 5px;
    }
}


/* STRONG STYLING FOR STATUS COLORS - ADD TO YOUR CSS */

/* Force background colors with max specificity */
div.beds24-status-open,
.beds24-property.beds24-status-open,
html body .beds24-messages .beds24-property.beds24-status-open {
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    border-left: 5px solid #dc3545 !important;
}

div.beds24-status-pending,
.beds24-property.beds24-status-pending,
html body .beds24-messages .beds24-property.beds24-status-pending {
    background-color: #fff3cd !important;
    border: 1px solid #ffeeba !important;
    border-left: 5px solid #ffc107 !important;
}

div.beds24-status-closed,
.beds24-property.beds24-status-closed,
html body .beds24-messages .beds24-property.beds24-status-closed {
    background-color: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    border-left: 5px solid #28a745 !important;
}

/* Force status dot colors */
.beds24-status-dot-red {
    background-color: #dc3545 !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
}

.beds24-status-dot-green {
    background-color: #28a745 !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important; 
    border-radius: 50% !important;
}

.beds24-status-dot-amber {
    background-color: #ffc107 !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
}

/* Make status indicators more visible */
.beds24-status-indicator {
    display: flex !important;
    align-items: center !important;
    margin-left: 15px !important;
    font-weight: bold !important;
    padding: 3px 10px !important;
    border-radius: 12px !important;
    background-color: rgba(0,0,0,0.05) !important;
}
/* Time-based status colors */
.beds24-status-fresh {
    background-color: #d4edda !important;
    border-left: 5px solid #28a745 !important;
}

.beds24-status-recent {
    background-color: #e8f3db !important; 
    border-left: 5px solid #93c54b !important;
}

.beds24-status-pending {
    background-color: #fff3cd !important;
    border-left: 5px solid #ffc107 !important;
}

.beds24-status-waiting {
    background-color: #ffe5d0 !important;
    border-left: 5px solid #fd7e14 !important;
}

.beds24-status-urgent {
    background-color: #f8d7da !important;
    border-left: 5px solid #dc3545 !important;
}

.beds24-status-critical {
    background-color: #e7dff1 !important;
    border-left: 5px solid #6f42c1 !important;
}

.beds24-status-closed {
    background-color: #d4edda !important;
    border-left: 5px solid #28a745 !important;
}

/* Status dot colors to match */
.beds24-status-dot-green {
    background-color: #28a745 !important;
}

.beds24-status-dot-light-yellow {
    background-color: #93c54b !important;
}

.beds24-status-dot-yellow {
    background-color: #ffc107 !important;
}

.beds24-status-dot-orange {
    background-color: #fd7e14 !important;
}

.beds24-status-dot-red {
    background-color: #dc3545 !important;
}

.beds24-status-dot-purple {
    background-color: #6f42c1 !important;
}






/**
 * CSS for Beds24 Messages Plugin
 */

/* Main container */
.beds24-messages {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin-bottom: 30px;
    color: #333;
}

/* View toggle */
.beds24-view-toggle {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.beds24-view-toggle span {
    margin-right: 10px;
    font-weight: 600;
}

.beds24-view-button {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.beds24-view-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Search container */
.beds24-search-container {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.beds24-search-container label {
    margin-right: 10px;
    font-weight: 600;
}

.beds24-search-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-right: 10px;
}

.beds24-search-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.beds24-search-button:hover {
    background-color: #0069d9;
}

/* Property row */
.beds24-property {
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.beds24-property-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.beds24-property-name {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    min-width: 180px;
}

.beds24-last-message {
    flex-grow: 1;
    color: #495057;
    font-size: 0.9em;
    margin: 0 10px;
}

.beds24-message-count {
    background-color: rgba(0,0,0,0.1);
    color: #495057;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 10px;
}

.beds24-toggle-property {
    width: 24px;
    height: 24px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.beds24-status-indicator {
    display: flex;
    align-items: center;
    margin-left: 10px;
    text-transform: capitalize;
    font-size: 0.9em;
}

.beds24-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Property messages container */
.beds24-property-messages {
    padding: 15px;
    background-color: white;
}

/* Individual message */
.beds24-message {
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.beds24-message-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.beds24-message-date {
    color: #6c757d;
    font-size: 0.85em;
}

.beds24-message-from {
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.beds24-message-content {
    padding: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Booking details */
.beds24-booking-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    font-size: 0.85em;
}

.beds24-booking-details span {
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

/* Reply form */
.beds24-reply-form {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.beds24-send-message-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.beds24-booking-select,
.beds24-send-message-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 10px;
}

.beds24-send-message-form textarea {
    min-height: 100px;
    resize: vertical;
}

.beds24-send-button {
    background-color: #28a745;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.beds24-send-button:hover {
    background-color: #218838;
}

.beds24-send-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.beds24-reply-status {
    margin-top: 10px;
    border-radius: 4px;
}

/* List view */
.beds24-list-view {
    margin-top: 15px;
}

.beds24-messages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Error and info messages */
.beds24-error,
.beds24-no-messages {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.beds24-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.beds24-no-messages {
    background-color: #e2e3e5;
    border: 1px solid #d6d8db;
    color: #383d41;
}

/* Debug container */
.beds24-debug {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.beds24-debug h4 {
    margin-top: 0;
}

.beds24-debug pre {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    overflow: auto;
}