/* Lead Magnet Pro Popup CSS */

/* Overlay - Fixed Fullscreen */
.lmp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Popup Container */
.lmp-popup-container {
    background-color: #fff; /* Default fallback */
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: lmpFadeIn 0.3s ease-out;
    margin: auto;
}

/* Content Wrapper */
.lmp-popup-content {
    padding: 40px;
    text-align: center;
    color: #fff; /* Assuming dark backgrounds often used, but text color might need adjustment based on bg */
}

/* Adjust text color for better contrast if user picks light bg? 
   Ideally, we'd calculate contrast, but for now we default to white text 
   assuming standardized high-conversion colorful backgrounds. 
   Adding a class for light/dark modes would be an enhancement. 
   For now, let's use a subtle text shadow to ensure readability 
   or set specific colors. 
   Actually, let's set text color to white by default as mostly these are colored boxes.
*/
.lmp-popup-content, 
.lmp-popup-content h2, 
.lmp-popup-content p {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Headline */
.lmp-headline {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    margin-top: 0;
}

/* Description */
.lmp-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.95;
}

.lmp-description p {
    margin-bottom: 10px;
}

/* Form Styles */
.lmp-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

/* Input Group */
.lmp-input-group {
    width: 100%;
}

/* Email Input */
.lmp-email-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid transparent;
    border-radius: 6px;
    background-color: #ffffff;
    color: #333;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 50px; /* Consistent height */
}

.lmp-email-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

/* Submit Button */
.lmp-submit-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.2s ease;
    height: 50px; /* Consistent height */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lmp-submit-btn:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.lmp-submit-btn:active {
    transform: translateY(1px);
}

.lmp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Message Area */
.lmp-message {
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
    font-weight: 500;
}

.lmp-message.success {
    color: #d1fae5; /* Light green */
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 4px;
}

.lmp-message.error {
    color: #fecaca; /* Light red */
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 4px;
}

/* Animation */
@keyframes lmpFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading Spinner */
.lmp-spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    -webkit-animation: lmpSpin 1s linear infinite; /* Safari */
    animation: lmpSpin 1s linear infinite;
    display: inline-block;
}

@keyframes lmpSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* -----------------------------------------------------------------
   Responsive Design
----------------------------------------------------------------- */

/* Tablet & Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .lmp-overlay {
        padding: 15px;
        align-items: flex-start; /* Move up slightly on mobile to avoid keyboard cover */
        padding-top: 10vh;
    }

    .lmp-popup-content {
        padding: 25px 20px;
    }

    .lmp-headline {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .lmp-description {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* Stack elements vertically and increase touch targets */
    .lmp-form {
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .lmp-email-input,
    .lmp-submit-btn {
        height: 55px; /* Larger touch target */
        font-size: 16px; /* Prevent IOS zoom on focus */
    }
}

/* Small Mobile (max-width: 380px) */
@media (max-width: 380px) {
    .lmp-headline {
        font-size: 20px;
    }
    
    .lmp-description {
        font-size: 14px;
    }
    
    .lmp-popup-content {
        padding: 20px 15px;
    }
}
