#wcpc-modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.85); 
    z-index: 99999999; 
    align-items: center; 
    justify-content: center;
    /* Allow clicks to pass through when not directly on overlay */
    pointer-events: auto;
}

/* The modal box itself should capture clicks */
.wcpc-modal-box {
    background: #fff; 
    padding: 40px 30px; 
    width: 90%; 
    max-width: 380px; 
    border-radius: 15px; 
    text-align: center; 
    position: relative;
    pointer-events: auto; /* Ensure modal box captures clicks */
    z-index: 100000000; /* Higher than overlay */
}

/* Overlay should allow clicks to pass to elements underneath when not clicking on it */
#wcpc-modal-overlay:not(:has(.wcpc-modal-box:hover)) {
    /* This allows clicks to pass through to other elements */
    background: rgba(0,0,0,0.5); /* Lighter background to indicate it's less intrusive */
}

/* When clicking on empty overlay area (outside modal), close it */
#wcpc-modal-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.wcpc-input-wrapper {
    display: flex; 
    background: #f9f9f9; 
    border: 2px solid #ddd; 
    border-radius: 8px; 
    margin: 20px 0; 
    overflow: hidden;
    pointer-events: auto;
}

.wcpc-prefix { 
    padding: 12px; 
    background: #eee; 
    border-right: 1px solid #ddd; 
    font-weight: bold; 
}

#wcpc-phone-input { 
    flex: 1; 
    border: none; 
    padding: 12px; 
    font-size: 18px; 
    outline: none; 
    pointer-events: auto;
}

#wcpc-submit-btn {
    width: 100%; 
    padding: 14px; 
    background: #075e54; 
    color: #fff; 
    border: none; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer;
    pointer-events: auto;
}

#wcpc-error-msg { 
    color: red; 
    font-size: 12px; 
    margin-top: 10px; 
}

/* Close Button Styling */
#wcpc-close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    pointer-events: auto;
    z-index: 100000001;
}
#wcpc-close-modal:hover {
    color: #333;
}