/* Main container */
.mwnotif-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: transform 0.5s ease-in-out;
    transform: translateY(-100%); /* Start off-screen */
    display: block !important; /* Ensure it's always in the DOM */
}

.mwnotif-container.show {
    transform: translateY(0) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* For all logged-in users */
body.logged-in .mwnotif-container {
    display: block !important; /* Force display for all logged-in users */
    visibility: visible !important; /* Force visibility for all logged-in users */
    opacity: 1 !important; /* Force opacity for all logged-in users */
    transform: translateY(0) !important; /* Force transform for all logged-in users */
}

/* For WordPress admin bar */
.admin-bar .mwnotif-container {
    top: 32px; /* Adjust for admin bar */
    display: block !important; /* Force display for logged-in users with admin bar */
    visibility: visible !important; /* Force visibility for logged-in users with admin bar */
    opacity: 1 !important; /* Force opacity for logged-in users with admin bar */
    transform: translateY(0) !important; /* Force transform for logged-in users with admin bar */
}

/* Special classes for logged-in and admin users */
.mwnotif-logged-in {
    display: block !important; /* Force display for logged-in users */
    visibility: visible !important; /* Force visibility for logged-in users */
    opacity: 1 !important; /* Force opacity for logged-in users */
    transform: translateY(0) !important; /* Force transform for logged-in users */
}

.mwnotif-admin {
    display: block !important; /* Force display for admin users */
    visibility: visible !important; /* Force visibility for admin users */
    opacity: 1 !important; /* Force opacity for admin users */
    transform: translateY(0) !important; /* Force transform for admin users */
}

/* Special class for admin users (added by JavaScript) */
.mwnotif-admin-user {
    display: block !important; /* Force display for admin users */
    visibility: visible !important; /* Force visibility for admin users */
    opacity: 1 !important; /* Force opacity for admin users */
    transform: translateY(0) !important; /* Force transform for admin users */
}

@media screen and (max-width: 782px) {
    body.logged-in .mwnotif-container {
        display: block !important; /* Force display for all logged-in users on mobile */
        visibility: visible !important; /* Force visibility for all logged-in users on mobile */
        opacity: 1 !important; /* Force opacity for all logged-in users on mobile */
        transform: translateY(0) !important; /* Force transform for all logged-in users on mobile */
    }

    .admin-bar .mwnotif-container {
        top: 46px; /* Adjust for mobile admin bar */
        display: block !important; /* Force display for logged-in users with admin bar on mobile */
        visibility: visible !important; /* Force visibility for logged-in users with admin bar on mobile */
        opacity: 1 !important; /* Force opacity for logged-in users with admin bar on mobile */
        transform: translateY(0) !important; /* Force transform for logged-in users with admin bar on mobile */
    }
}

/* Alert styling */
.mwnotif-alert {
    position: relative;
    padding: 15px;
    margin-bottom: 0;
    border: 1px solid transparent;
    border-radius: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mwnotif-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 30px; /* Space for close button in slideout */
}

/* Modal content doesn't need right padding since it has no close button */
.mwnotif-modal .mwnotif-content {
    padding-right: 0;
}

/* Close button */
.mwnotif-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    margin: 0;
    color: inherit;
}

/* Flag icon */
.mwnotif-flag-icon {
    position: fixed;
    top: 0;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 0 0 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mwnotif-flag-icon .bi {
    font-size: 20px;
}

.admin-bar .mwnotif-flag-icon {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .mwnotif-flag-icon {
        top: 46px;
    }
}

.mwnotif-flag-icon.show {
    opacity: 1;
    visibility: visible;
}

/* Close button in modal */
.mwnotif-modal-content .mwnotif-close {
    top: 10px;
    right: 10px;
    transform: none;
    z-index: 10;
}

.mwnotif-close:hover {
    opacity: 1;
}

/* Admin editing */
#mwnotif-editor-container {
    margin-bottom: 10px;
}

.mwnotif-editor-toolbar {
    margin-bottom: 5px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 3px;
    background-color: #f8f9fa;
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Pell editor overrides */
.pell-content {
    box-sizing: border-box;
}

.pell-button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    height: 30px;
    width: 30px;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pell-button:hover {
    background-color: #d0d0d0;
    border-color: #999;
}

.pell-button-selected {
    background-color: #007bff;
    border-color: #0056b3;
    color: white;
}

.mwnotif-editable {
    min-height: 20px;
    padding: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 3px;
    transition: border-color 0.3s;
    background-color: #fff;
}

.mwnotif-editable:hover, 
.mwnotif-editable:focus {
    border-color: rgba(0,0,0,0.3);
    outline: none;
}

.mwnotif-placeholder {
    opacity: 0.7;
    font-style: italic;
}

/* Formatting styles */
.mwnotif-editable b, .mwnotif-editable strong {
    font-weight: bold;
}

.mwnotif-editable i, .mwnotif-editable em {
    font-style: italic;
}

.mwnotif-editable u {
    text-decoration: underline;
}

.mwnotif-editable h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

.mwnotif-editable h2 {
    font-size: 1.5em;
    margin: 0.75em 0;
}

.mwnotif-editable h3 {
    font-size: 1.17em;
    margin: 0.83em 0;
}

.mwnotif-editable ul, .mwnotif-editable ol {
    margin-left: 20px;
}

.mwnotif-editable blockquote {
    margin-left: 20px;
    padding-left: 10px;
    border-left: 3px solid #ccc;
}

/* Empty notification (only visible to admins) */
.mwnotif-empty {
    border: 2px dashed rgba(0,0,0,0.2);
}

/* Admin controls */
.mwnotif-admin-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

/* Settings panel */
.mwnotif-settings-panel {
    background-color: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    display: block; /* Visible by default */
    color: #333; /* Default text color for all elements in the settings panel */
}

/* Ensure all form elements in the settings panel have the correct color */
.mwnotif-settings-panel input,
.mwnotif-settings-panel label,
.mwnotif-settings-panel select,
.mwnotif-settings-panel textarea,
.mwnotif-settings-panel button {
    color: #333;
}

/* Preview box */
.mwnotif-preview-box {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 15px;
}

.mwnotif-preview-box h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

#mwnotif-preview {
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#mwnotif-preview-text {
    font-size: 14px;
    line-height: 1.4;
    padding: 5px;
}

.mwnotif-settings-panel h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}

.mwnotif-settings-row {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.mwnotif-settings-row label {
    min-width: 120px;
    margin-right: 10px;
}

.mwnotif-settings-row input[type="text"] {
    width: 150px;
}

/* Override WordPress color picker in frontend */
.wp-picker-container {
    display: inline-block;
}

.wp-picker-container .wp-color-result.button {
    height: 24px;
    margin: 0 6px 0 0;
}

.wp-picker-container .wp-color-picker {
    height: 24px;
    min-height: 24px;
    padding: 0 5px;
}

/* Datepicker customization */
.ui-datepicker {
    z-index: 10000 !important; /* Ensure datepicker appears above other elements */
}

/* Animation for notification */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

.mwnotif-slide-down {
    animation: slideDown 0.5s forwards;
}

.mwnotif-slide-up {
    animation: slideUp 0.5s forwards;
}

/* Modal styles */
.mwnotif-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.mwnotif-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9998;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
}

.mwnotif-modal-dialog {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 100%;
    max-width: 500px;
    display: none;
}

.mwnotif-modal-content {
    position: relative;
    background-color: #f8d7da;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    background-clip: padding-box;
    outline: 0;
}


.mwnotif-modal-body {
    position: relative;
    padding: 15px;
}

/* Modal footer and OK button styles removed as they are no longer used */

/* Show modal elements when container has show class */
.mwnotif-modal.show .mwnotif-modal-backdrop,
.mwnotif-modal.show .mwnotif-modal-dialog {
    display: block;
}

/* Modal display type specific styles */
.mwnotif-modal .mwnotif-modal-backdrop {
    display: block;
}

.mwnotif-modal .mwnotif-modal-dialog {
    display: block;
}

/* For WordPress admin bar with modal */
.admin-bar .mwnotif-modal .mwnotif-modal-dialog {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .mwnotif-modal .mwnotif-modal-dialog {
        margin-top: 46px;
    }
}