/**
 * MCQ Notification Modal Styles
 *
 * Clean, mobile-friendly modal system for notifications and confirmations.
 * Optimized for touch devices and small screens.
 */

/* Overlay */
.mcq-notify-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: mcqFadeIn 0.2s ease-out;
}

@keyframes mcqFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.mcq-notify-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 440px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    position: relative;
    animation: mcqSlideUp 0.3s ease-out;
}

@keyframes mcqSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.mcq-notify-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    z-index: 1;
}

.mcq-notify-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.mcq-notify-close:active {
    transform: scale(0.95);
}

/* Icon Section */
.mcq-notify-icon-wrapper {
    text-align: center;
    padding: 32px 24px 16px;
}

.mcq-notify-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    display: block;
}

.mcq-notify-success {
    color: #10b981;
}

.mcq-notify-error {
    color: #ef4444;
}

.mcq-notify-warning {
    color: #f59e0b;
}

.mcq-notify-info {
    color: #3b82f6;
}

/* Content Section */
.mcq-notify-content {
    padding: 0 24px 24px;
    text-align: center;
}

.mcq-notify-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
    padding-right: 32px; /* Space for close button */
}

.mcq-notify-message {
    font-size: 15px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
    word-wrap: break-word;
}

/* Buttons Section */
.mcq-notify-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
}

.mcq-notify-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcq-notify-btn:active {
    transform: scale(0.98);
}

.mcq-notify-btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

.mcq-notify-btn-primary:hover {
    background: #2563eb;
}

.mcq-notify-btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
}

.mcq-notify-btn-secondary:hover {
    background: #e5e7eb;
}

.mcq-notify-btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.mcq-notify-btn-danger:hover {
    background: #dc2626;
}

/* Single button layout */
.mcq-notify-actions-single {
    padding: 16px 24px 24px;
}

.mcq-notify-actions-single .mcq-notify-btn {
    width: 100%;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .mcq-notify-overlay {
        padding: 16px;
    }

    .mcq-notify-modal {
        border-radius: 12px;
        max-height: 85vh;
    }

    .mcq-notify-icon-wrapper {
        padding: 24px 20px 12px;
    }

    .mcq-notify-icon {
        width: 56px;
        height: 56px;
    }

    .mcq-notify-content {
        padding: 0 20px 20px;
    }

    .mcq-notify-title {
        font-size: 18px;
        padding-right: 28px;
    }

    .mcq-notify-message {
        font-size: 14px;
    }

    .mcq-notify-actions {
        padding: 12px 20px 20px;
        gap: 10px;
    }

    .mcq-notify-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .mcq-notify-close {
        top: 12px;
        right: 12px;
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .mcq-notify-actions {
        flex-direction: column;
    }

    .mcq-notify-btn {
        width: 100%;
    }
}

/* Accessibility */
.mcq-notify-overlay:focus {
    outline: none;
}

.mcq-notify-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Prevent text selection on rapid taps */
.mcq-notify-modal {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.mcq-notify-message {
    -webkit-user-select: text;
    user-select: text;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .mcq-notify-modal {
        background: #1f2937;
    }

    .mcq-notify-title {
        color: #f9fafb;
    }

    .mcq-notify-message {
        color: #d1d5db;
    }

    .mcq-notify-btn-secondary {
        background: #374151;
        color: #f9fafb;
    }

    .mcq-notify-btn-secondary:hover {
        background: #4b5563;
    }

    .mcq-notify-close {
        color: #9ca3af;
    }

    .mcq-notify-close:hover {
        background: #374151;
        color: #f9fafb;
    }
}
