/* Container Fixes */
.cbe-container { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.cbe-card { background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.widefat { width: 100%; margin-bottom: 15px; border: 1px solid #ccc; padding: 8px; border-radius: 4px; }

/* Frontend Interface */
#cbe-notification-wrapper {
    width: 100%;
    background: #1a1a1a; /* Dark theme compatible bg */
    border: 1px solid #333;
    border-radius: 10px;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
    color: #fff;
}

.cbe-header {
    background: #000;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}
.cbe-header h3 { margin: 0; color: #fff; font-size: 16px; font-weight: 600; }

.badge {
    background: #ff3b30;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 5px;
}

/* List Items */
.cbe-msg-item {
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
    background: #252525;
}
.cbe-msg-item:hover { background: #333; }

/* Unread State */
.cbe-msg-item.unread { 
    background: #2c2c2c; 
    border-left: 4px solid #ff3b30; /* CBE Red color */
}
.cbe-msg-item.unread .cbe-msg-title {
    font-weight: bold;
    color: #fff;
}

/* Read State */
.cbe-msg-item.read { opacity: 0.8; }
.cbe-msg-item.read .cbe-msg-title { color: #ccc; }

.cbe-msg-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cbe-msg-title { font-size: 15px; flex-grow: 1; margin-right: 10px; }
.cbe-msg-date { font-size: 11px; color: #777; white-space: nowrap; }

/* Content Accordion */
.cbe-msg-body {
    display: none;
    padding: 20px;
    background: #fff; /* Content stays white for readability */
    color: #333;
    line-height: 1.6;
    border-top: 1px solid #444;
}
.cbe-msg-body .content img { max-width: 100%; height: auto; }

.cbe-msg-actions {
    margin-top: 15px;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.cbe-btn-del {
    background: #ffcdd2;
    color: #c62828;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.cbe-btn-small {
    background: #0073aa;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- TOAST NOTIFICATION (Mobile Fix) --- */
#cbe-toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 30px; /* Slide from top */
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.5s, top 0.5s;
}

#cbe-toast.show {
    visibility: visible;
    opacity: 1;
    top: 50px; /* Moves down slightly */
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .cbe-msg-header { flex-direction: column; align-items: flex-start; }
    .cbe-msg-date { margin-top: 5px; }
    #cbe-notification-wrapper { border-radius: 0; border: none; }
}