/**
 * MMS Client Security & Anti-Inspect Shield Stylesheet
 * North Central Provincial Council - Mail Management System (MMS)
 */

/* Prevent accidental selecting and dragging of system chrome & logos */
.app-header,
.app-sidebar,
.sidebar-brand,
.navbar,
.btn,
.badge,
.card-header,
.stat-card,
.stat-card-icon,
.mms-page-link,
.table-responsive thead th,
.table-actions,
img,
svg {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Ensure data entry inputs, textareas, and select fields are fully selectable & editable */
input,
textarea,
select,
.form-control,
.select2,
[contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* DevTools Detection Blur Shield (DISABLED) */
body.mms-shield-active .app-wrapper,
body.mms-shield-active .login-card,
body.mms-shield-active main {
    filter: none !important;
    pointer-events: auto !important;
    user-select: auto !important;
}

/* Fullscreen Security Overlay (DISABLED) */
#mms-security-overlay,
#mms-security-overlay.active {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.mms-security-modal {
    background: #1e293b;
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 32px 28px;
    text-align: center;
    color: #f8fafc;
    font-family: 'Inter', -apple-system, sans-serif;
    animation: mmsModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mmsModalPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.mms-security-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.mms-security-modal h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #ffffff;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.mms-security-modal p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #94a3b8;
    margin: 0 0 12px;
}

.mms-security-modal .mms-sec-sinhala {
    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 24px;
    line-height: 1.5;
}

.mms-security-modal .mms-sec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid #3b82f6;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
    width: 100%;
}

.mms-security-modal .mms-sec-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
}

/* Security Notice Toast Notification */
.mms-sec-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.mms-sec-toast {
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    border-left: 4px solid #ef4444;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    max-width: 390px;
}

.mms-sec-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.mms-sec-toast-icon {
    color: #ef4444;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* Print Layout Cleanliness */
@media print {
    #mms-security-overlay,
    .mms-sec-toast-container {
        display: none !important;
        opacity: 0 !important;
    }
    body.mms-shield-active .app-wrapper,
    body.mms-shield-active main {
        filter: none !important;
    }
}
