/* Popup Overlay */
#pnp-popup {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Darker overlay */
    z-index: 9999;
    opacity: 0;
    visibility: hidden; /* Hidden by default */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex; /* Use flexbox for centering */
    align-items: center;
    justify-content: center;
}

#pnp-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Popup Content */
.pnp-popup-content {
    background: #fff;
    border-radius: 12px; /* Slightly more rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
    width: 90%; /* Responsive width */
    max-width: 550px; /* Max width for larger screens */
    text-align: center;
    padding: 30px; /* Increased padding */
    position: relative;
    transform: translateY(20px); /* Initial state for animation */
    opacity: 0; /* Initial state for animation */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#pnp-popup.show .pnp-popup-content {
    transform: translateY(0); /* Final state for animation */
    opacity: 1;
}

/* Close Button */
.pnp-close {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    font-size: 28px; /* Larger close icon */
    color: #888;
    transition: color 0.2s ease;
}

.pnp-close:hover {
    color: #333;
}

/* Focus outline for accessibility */
.pnp-close:focus,
#pnp-save-phone:focus,
#pnp-close-success:focus {
    outline: 2px solid #004444; /* Standard blue outline for focus */
    outline-offset: 2px;
}

/* Input Wrapper for intl-tel-input */
.pnp-input-wrapper {
    margin-bottom: 20px;
}

.pnp-input-wrapper .iti {
    width: 100%; /* Ensure intl-tel-input takes full width */
}

.pnp-input-wrapper .iti__flag-container {
    border-radius: 8px 0 0 8px; /* Match popup border-radius */
}

.pnp-input-wrapper .iti__country-list {
    border-radius: 0 0 8px 8px; /* Match popup border-radius */
}

.pnp-input-wrapper input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Rounded input field */
    font-size: 16px;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

/* Buttons */
.pnp-button {
    background: #004444; /* Primary blue color */
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px; /* Ensure consistent button size */
}

.pnp-button:hover {
    background-color: #22c55e; /* Darker blue on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

.pnp-button:active {
    transform: translateY(0); /* Press effect */
}

/* Loading Spinner for button */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Popup Titles and Descriptions */
.pnp-popup-title {
    font-size: 32px; /* Larger title */
    color: #333;
    margin-bottom: 10px;
    line-height: 1.2;
}

.pnp-popup-des {
    color: #666; /* Softer text color */
    margin-bottom: 25px;
    font-size: 16px;
}

/* Messages (Success/Error) */
.pnp-message {
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 15px;
    font-weight: 500;
}

.pnp-message.pnp-success {
    color: #28a745; /* Green for success */
}

.pnp-message.pnp-error {
    color: #dc3545; /* Red for error */
}

/* Success State */
.pnp-success-state {
    padding: 20px 0;
}

.success-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

#pnp-close-success {
    margin-top: 25px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .pnp-popup-content {
        width: 95%;
        padding: 20px;
    }

    .pnp-popup-title {
        font-size: 28px;
    }

    .pnp-button {
        padding: 10px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .pnp-popup-content {
        padding: 15px;
    }

    .pnp-popup-title {
        font-size: 24px;
    }

    .pnp-popup-des {
        font-size: 14px;
    }

    .pnp-button {
        padding: 8px 20px;
        font-size: 15px;
    }

    .success-icon {
        width: 100px;
        height: 100px;
    }
}
