/* Basic styles for the LendPro popup modal */
#lendpro-popup-overlay { /* Prefixed ID */
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Slightly darker overlay */
    z-index: 99998;
}

#lendpro-popup-modal { /* Prefixed ID */
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 90vh;
    background-color: #ffffff;
    border-radius: 10px; /* Slightly more rounded */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* Softer shadow */
    z-index: 99999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#lendpro-popup-modal iframe {
    width: 100%;
    height: 100%;
}
/* New styles for the popup header */
#lendpro-popup-header { /* Prefixed ID */
    display: flex;
    justify-content: flex-end; /* Aligns close button to the right */
    padding: 8px 8px 0 8px; /* Add some padding around the header, especially top */
    background-color: #f9f9f9; /* Optional: slight background for header */
    border-bottom: 1px solid #eee; /* Optional: separator line */
}

#lendpro-close-popup { /* Prefixed ID */
    /* position: absolute; removed */
    /* top: 12px; removed */
    /* right: 12px; removed */
    background: #f1f1f1; /* Light background for button */
    border: none;
    border-radius: 50%; /* Circular button */
    font-size: 18px; /* Adjusted size */
    font-weight: bold;
    color: #555; /* Darker icon */
    cursor: pointer;
    padding: 0; /* Keep padding 0 if using line-height for centering */
    width: 30px; /* Explicit width */
    height: 30px; /* Explicit height */
    line-height: 30px; /* Center the 'x' */
    text-align: center;
    transition: background-color 0.2s, color 0.2s;
}
#lendpro-close-popup:hover { /* Prefixed ID */
    background-color: #e0e0e0;
    color: #000;
}

/* Styles for the pre-qualification button and amount display */
#lendpro-preapp-container {
    /* Example: Position this container in the header area */
    /* This will heavily depend on your theme's structure */
    /* You might need to use absolute positioning or hook into a specific theme action */
    /* For demonstration, let's just add some basic styling */
    display: flex;
    align-items: center;
    color: #51993a;
    text-align: center;
    font-weight: bold;
}

/* Style a cleanup link */

#lendpro-preapp-container a {
    text-decoration: none;
    outline: none;
    text-underline-offset: 0;
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

#lendpro-preapp-container a img {
    max-width: 100%;
    height: auto;
}

#lendpro-iframe-container { /* Prefixed ID */
    flex-grow: 1;
    position: relative;
    /* padding-top: 50px; Adjusted as close button is now in header */
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#lendpro-payment-iframe { /* Prefixed ID */
    width: 100%;
    height: 100%;
    border: none;
}

#lendpro-popup-content { /* Prefixed ID */
    text-align: center;
    font-size: 1.4rem; /* Use rem for better accessibility */
    color: #444;
    padding: 30px 40px 20px;
    background-color: rgba(255,255,255,0.8);
    border-radius: 5px;
    flex-grow: 1;
    justify-content: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lendpro-popup-content span {
    font-size: 1rem;
    color: #666;
    margin-top: 10px;
}

#lendpro-popup-footer {
    padding: 20px 40px;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-shrink: 0;
}

#lendpro-proceed-to-pay, #lendpro-proceed-to-apply{
    border: 1px solid #fff;
    border-radius: 50px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #fff;
    background-color: #276bcc;
    min-width: 250px;
    padding: 15px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #lendpro-popup-modal { /* Prefixed ID */
        width: 95%;
        height: 95%;
        max-height: none; /* Allow full height on small screens */
    }
    #lendpro-iframe-container { /* Prefixed ID */
         /* padding-top: 45px; Adjusted */
    }
    #lendpro-popup-header { /* Prefixed ID */
        padding: 6px 6px 0 6px;
    }
     #lendpro-close-popup { /* Prefixed ID */
        /* top: 8px; removed */
        /* right: 8px; removed */
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 16px;
    }
}

/* Billing updated notification */
#lendpro-billing-updated-msg {
    text-align: center;
    font-size: 1.1rem;
    color: #2c6e2e;
    padding: 20px 30px 10px;
    font-weight: 500;
}

/* Shared button style for OK and copy-shipping actions */
#lendpro-ok-btn,
#lendpro-copy-shipping-btn {
    border: 1px solid #fff;
    border-radius: 50px;
    box-sizing: border-box;
    color: #fff;
    background-color: #276bcc;
    min-width: 200px;
    padding: 12px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    margin-top: 10px;
}

#lendpro-ok-btn:hover,
#lendpro-copy-shipping-btn:hover {
    background-color: #1a55a8;
}

/* Shipping error message in modal */
#lendpro-shipping-error-msg {
    text-align: center;
    font-size: 1.2rem;
    color: #c0392b;
    padding: 20px 30px 10px;
}

/* Locked shipping field indicator */
.lendpro-field-locked {
    opacity: 0.5;
    cursor: not-allowed;
}
