.lmp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lmp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.lmp-modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 620px;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    animation: lmpSlideIn 0.32s cubic-bezier(.2,.8,.2,1);
    z-index: 2;
    overflow: hidden;
    box-sizing: border-box;
}

.lmp-modal-content::before {
    /* overlay layer to improve readability over background image */
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 0;
}

.lmp-modal-inner {
    position: relative;
    z-index: 2;
    padding: 34px 40px;
    background: rgba(255,255,255,0.96);
    box-sizing: border-box;
}

.lmp-modal-content[style*="background-image"] .lmp-modal-inner {
    background: rgba(0,0,0,0.45);
    color: #fff;
}

.lmp-modal-header h3, .lmp-modal-header p, .lmp-modal-text {
    color: inherit;
}

/* Close button */
.lmp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    border: none;
    cursor: pointer;
    z-index: 3;
}

.lmp-modal-content[style*="background-image"] .lmp-modal-close {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.lmp-modal-close:hover { opacity: 0.95; }

/* Ensure form elements do not overflow */
.lmp-form-group input, .lmp-form-group textarea, .lmp-submit-button {
    box-sizing: border-box;
    width: 100%;
}

@keyframes lmpSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes lmpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lmpFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes lmpScaleOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-20px) scale(.98); }
}

/* Close button */
.lmp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.lmp-modal-close:hover {
    color: #333;
}

/* Animation helper classes */
.lmp-modal.lmp-open .lmp-modal-inner {
    animation: lmpSlideIn 320ms cubic-bezier(.2,.8,.2,1) both;
}

.lmp-modal.lmp-closing .lmp-modal-inner {
    animation: lmpScaleOut 260ms ease-in both;
}

.lmp-modal.lmp-open .lmp-modal-overlay {
    animation: lmpFadeIn 260ms ease-out both;
}

.lmp-modal.lmp-closing .lmp-modal-overlay {
    animation: lmpFadeOut 220ms ease-in both;
}

/* Slide-right animation for desktop */
.lmp-anim-slide-right.lmp-open .lmp-modal-inner {
    animation: lmpSlideRightIn 360ms cubic-bezier(.22,.9,.34,1) both;
}

.lmp-anim-slide-right.lmp-closing .lmp-modal-inner {
    animation: lmpSlideRightOut 260ms ease-in both;
}

@keyframes lmpSlideRightIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes lmpSlideRightOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(40px) scale(.98);
    }
}

/* Mobile slide-up (full-screen feel) */
@media (max-width: 600px) {
    .lmp-anim-slide-up.lmp-open .lmp-modal-inner {
        animation: lmpSlideUpIn 360ms cubic-bezier(.2,.9,.34,1) both;
        transform-origin: center bottom;
    }

    .lmp-anim-slide-up.lmp-closing .lmp-modal-inner {
        animation: lmpSlideUpOut 260ms ease-in both;
    }
}

@keyframes lmpSlideUpIn {
    from { opacity: 0; transform: translateY(20px) scale(.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lmpSlideUpOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(20px) scale(.995); }
}

/* Zoom alternative */
.lmp-anim-zoom.lmp-open .lmp-modal-inner { animation: lmpZoomIn 300ms cubic-bezier(.2,.8,.2,1) both; }
.lmp-anim-zoom.lmp-closing .lmp-modal-inner { animation: lmpScaleOut 200ms ease-in both; }
@keyframes lmpZoomIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

.lmp-modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.lmp-modal-header h3 {
    margin: 0 0 6px 0;
    color: #222;
    font-size: 26px;
    font-weight: 600;
}

.lmp-modal-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.lmp-form-group {
    margin-bottom: 16px;
}

.lmp-form-group label {
    display: block;
    margin-bottom: 8px;
    color: inherit;
    font-weight: 600;
}

.lmp-form-group input, .lmp-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    font-size: 15px;
    transition: box-shadow 0.18s, border-color 0.18s;
    background: #fff;
}

.lmp-form-group input:focus, .lmp-form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.08);
    border-color: #0073aa;
}

.lmp-submit-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(180deg,#0073aa,#00628a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.08s;
}

.lmp-submit-button:active { transform: translateY(1px); }

.lmp-submit-button:hover {
    opacity: 0.96;
}

.lmp-form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.lmp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.lmp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .lmp-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .lmp-modal-inner {
        padding: 20px;
        overflow-y: auto;
        height: 100%;
        box-sizing: border-box;
    }

    .lmp-modal-header h3 {
        font-size: 20px;
    }

    .lmp-submit-button {
        padding: 12px;
        font-size: 16px;
    }
}