
/* Main Container */
.mipm-container {
    max-width: 900px;
    margin: 40px auto;
    background: #fcfcff;
    border-radius: 16px;
    box-shadow: 0 6px 32px #e6ecf2;
    padding: 32px 26px;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
}

/* Tabs */
.mipm-tabs {
    display: flex;
    border-bottom: 2px solid #f0f4f8;
    margin-bottom: 28px;
    gap: 0;
}
.mipm-tab {
    padding: 14px 30px;
    background: #f9fbfe;
    border: none;
    border-radius: 16px 16px 0 0;
    color: #2a3e52;
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
    margin-right: 2px;
}
.mipm-tab-active,
.mipm-tab:hover {
    background: #eef6fc;
    color: #2274a5;
}
.mipm-tab-content { padding: 18px 0 0 0; }

/* Form Styles */
.mipm-form {
    width: 100%;
}
.mipm-form input,
.mipm-form select,
.mipm-form textarea {
    width: 100%;
    padding: 12px 10px;
    margin-bottom: 18px;
    border: 1px solid #c9d6e3;
    border-radius: 6px;
    background: #f7faff;
    font-size: 16px;
    transition: border 0.2s;
    box-sizing: border-box;
}
.mipm-form input:focus,
.mipm-form select:focus,
.mipm-form textarea:focus {
    border-color: #2274a5;
    background: #f0f7fc;
}
.mipm-form button {
    background: #2274a5;
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.2s;
    box-shadow: 0 1px 3px #e7e7e7;
}
.mipm-form button:hover {
    background: #16527d;
}
.mipm-form label { font-size: 15px; display:block; margin-bottom: 4px; color: #222;}
.mipm-form textarea { height: 90px; resize: vertical; }

/* Role list (bulk) */
.mipm-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 14px;
}
.mipm-role-item {
    background: #eef6fc;
    border-radius: 5px;
    padding: 5px 14px 5px 7px;
    font-size: 15px;
}
.mipm-premium-all label {
    margin-right: 22px;
    font-weight: 500;
}

/* Message List */
.mipm-messages-list {
    margin: 0;
}

/* Bulk Actions */
.mipm-bulk-actions {
    margin-bottom: 10px;
}
.mipm-bulk-actions .mipm-bulk-delete {
    background: #ff9800;
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 1px 2px #e0e0e0;
}
.mipm-bulk-actions .mipm-bulk-delete:hover {
    background: #e65100;
}

/* Message List Items */
.mipm-message {
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 2px;
    padding: 0;
    background: #fafdff;
    border-radius: 6px;
    transition: background 0.15s;
}
.mipm-message.expanded { background: #eaf6fd; }
.mipm-unread .mipm-message-header {
    font-weight: bold;
    color: #1b4c6b;
}
.mipm-message-header {
    display: flex;
    align-items: center;
    gap: 1em;
    cursor: pointer;
    padding: 13px 8px 13px 0;
}
.mipm-message-header strong { margin-right: 10px; }
.mipm-message-header input[type="checkbox"] {
    margin-right: 12px;
    accent-color: #2274a5;
}
.mipm-message-actions { margin-left: auto; }
.mipm-message-actions button,
.mipm-message-actions .mipm-reply-link {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-block;
}
.mipm-message-actions .mipm-reply-link {
    background: #2274a5;
}
.mipm-message-actions button:hover { background: #b93220; }
.mipm-message-actions .mipm-reply-link:hover { background: #16527d; }

/* Message body (expanded content) */
.mipm-message-body {
    padding: 16px 32px 16px 36px;
    color: #263238;
    background: #fcfdff;
    font-size: 15px;
    border-radius: 0 0 6px 6px;
    display: none;
}
.mipm-message.expanded .mipm-message-body {
    display: block;
}

/* Inline Reply Form */
.mipm-reply-inline-form input[readonly] {
    background: #eaf2fa;
    color: #444;
    display: none !important;
}
.mipm-reply-inline-form label { font-size: 15px; margin-bottom:2px; display:block;}
.mipm-reply-inline-form textarea { width:100%; min-height:80px; }
.mipm-reply-inline-form button[type=submit] { background:#2274a5; color:#fff; }
.mipm-reply-inline-form button[type=submit]:hover { background:#16527d; }

/* Notifications */
.mipm-notifications .mipm-confirm {
    padding: 13px 18px;
    background: #e8f9e4;
    border-left: 5px solid #4caf50;
    color: #256029;
    font-size: 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-weight: 600;
    box-shadow: 0 1px 2px #e7e7e7;
}
.mipm-notifications .mipm-error {
    padding: 13px 18px;
    background: #ffe5e5;
    border-left: 5px solid #e53935;
    color: #9b2222;
    font-size: 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-weight: 600;
    box-shadow: 0 1px 2px #f3c3c3;
}

/* Notification Bar (Tooltip Style) */
.mipm-notification-bar {
    background: linear-gradient(135deg, #ffeb3b, #ffd700);
    color: #333;
    padding: 12px 16px;
    border-radius: 10px;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20000;
    box-shadow: -4px 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    width: 480px; /* già espansa */
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: none !important;
}

/* Rimuoviamo completamente l'effetto hover */
.mipm-notification-bar:hover {
    transform: translateY(-50%) !important;
    width: 480px !important;
    box-shadow: -4px 4px 12px rgba(0,0,0,0.3) !important;
}
.mipm-notification-icon {
    font-size: 26px;
    animation: bellRing 1s ease-in-out infinite;
    flex-shrink: 0;
}
.mipm-notification-count {
    background: #d32f2f;
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}
/* Mostriamo sempre il contenuto */
.mipm-notification-content {
    display: flex !important;
    align-items: center;
    gap: 12px;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: none !important;
    transition: none !important;
}
.mipm-notification-bar:hover .mipm-notification-content,
.mipm-notification-bar.active .mipm-notification-content {
    max-height: none !important;
opacity: 1 !important;
visibility: visible !important;
}
.mipm-notification-text {
    font-weight: 600;
}
.mipm-notification-details {
    font-size: 14px;
    color: #444;
    font-weight: 400;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Popup Notification */
.mipm-notification-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 20001; /* Higher than notification bar */
    max-width: 350px;
    animation: slideUp 0.5s ease-in-out;
}
.mipm-notification-popup .mipm-popup-title {
    font-weight: 600;
    font-size: 16px;
    color: #2274a5;
    margin-bottom: 8px;
}
.mipm-notification-popup .mipm-popup-content {
    font-size: 14px;
    color: #333;
}
.mipm-notification-popup .mipm-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
}

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%) translateY(-50%); opacity: 0; }
    to { transform: translateY(-50%); opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes bellRing {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(5deg); }
    60% { transform: rotate(-5deg); }
    70% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* Responsive */
@media (max-width: 700px) {
    .mipm-container { padding: 12px 2vw; font-size: 15px; }
    .mipm-message-body { padding: 12px 8px 12px 18px; }
    .mipm-message-header { padding: 10px 4px 10px 0; font-size: 15px; }
    .mipm-form button,
    .mipm-bulk-actions .mipm-bulk-delete { font-size: 14px; padding: 9px 16px; }
    .mipm-tab { font-size: 15px; padding: 10px 12px; }
    .mipm-notification-bar { 
        padding: 8px;
        font-size: 14px;
        width: 80px; /* Adjusted collapsed width for mobile */
        right: 0;
        top: 50%;
    }
    .mipm-notification-bar:hover,
    .mipm-notification-bar.active {
        width: 90%; /* Expanded width for mobile */
        max-width: 300px;
    }
    .mipm-notification-icon { font-size: 20px; }
    .mipm-notification-count { padding: 3px 8px; font-size: 12px; }
    .mipm-notification-details { font-size: 12px; }
    .mipm-notification-popup {
        max-width: 80%;
        bottom: 10px;
        right: 10px;
    }
}