/* Linear App Style Modal */

/* Overlay */
.mcme-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mcme-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.mcme-modal-container {
    background: var(--mcme-modal-bg, #1a1a1a);
    color: #f5f5f5;
    width: 90%;
    max-width: 520px; /* Slightly wider on desktop */
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mcme-modal-overlay.is-visible .mcme-modal-container {
    transform: translateY(0);
    opacity: 1;
}

/* Close Button */
.mcme-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
    z-index: 10;
}

.mcme-modal-close:hover {
    color: #fff;
}

/* Header */
.mcme-modal-header {
    padding: 20px 25px;
    background-color: var(--mcme-header-bg, #1a1a1a);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mcme-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Body */
.mcme-modal-body {
    padding: 25px;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    background-color: var(--mcme-body-bg, #1a1a1a);
}

.mcme-modal-body p {
    margin-bottom: 1em;
}

.mcme-modal-body p:last-child {
    margin-bottom: 0;
}

/* Footer */
.mcme-modal-footer {
    padding: 0 25px 25px;
    display: flex;
    justify-content: flex-end;
}

/* Button */
.mcme-modal-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--mcme-btn-bg, #ffffff);
    color: var(--mcme-btn-text, #000000);
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mcme-modal-btn:hover {
    background: #4f5bbf;
    color: white;
}

.mcme-modal-btn:active {
    transform: translateY(1px);
}

/* Responsive */
@media (max-width: 640px) {
    .mcme-modal-container {
        width: 95%; /* Wider on small mobile */
        max-width: none;
        margin: 16px;
        border-radius: 16px; /* Rounder on mobile looks modern */
    }
    
    .mcme-modal-header {
        padding: 20px 20px 12px;
    }
    
    .mcme-modal-body {
        padding: 20px;
    }
    
    .mcme-modal-footer {
        padding: 12px 20px 20px;
    }
}

@media (min-width: 1024px) {
    .mcme-modal-container {
        max-width: 600px; /* Even wider for large screens if needed, but 520px is good for Linear style */
    }
}
