/* Google Pay Overlay Styles */
html.gpay-overlay-lock,
body.gpay-overlay-lock {
    /* Keep page from jumping while the sheet mounts Stripe widgets */
    scroll-behavior: auto !important;
}

.gpay-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    overscroll-behavior: contain;
}

.ecc-gpay-inline-error {
    display: none;
    margin: 10px 4px 2px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.ecc-gpay-inline-error.is-visible {
    display: block;
}

.gpay-fallback-tip,
.gpay-error {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    line-height: 1.4;
}

.gpay-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.gpay-overlay-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}

.gpay-overlay-close {
    position: absolute;
    top: 5px; /* Adjusted for better spacing */
    right: 5px; /* Adjusted for better spacing */
    width: 44px; /* Further increased size for easier clicking */
    height: 44px;
    border-radius: 50%; /* Make it round */
    background-color: #f0f0f0; /* Light background */
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease; /* Smooth transitions */
    padding: 0; /* Remove default button padding */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow */
    z-index: 10001; /* Ensure it's above other elements */
}

.gpay-overlay-close svg {
    width: 20px; /* Size of the SVG icon */
    height: 20px;
    color: #555; /* Icon color */
    transition: color 0.2s ease;
}

.gpay-overlay-close:hover {
    background-color: #e0e0e0; /* Darker background on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

.gpay-overlay-close:hover svg {
    color: #000; /* Darker icon on hover */
}

.gpay-overlay-close:active {
    background-color: #d0d0d0; /* Even darker on active/click */
    transform: scale(0.98); /* Slightly shrink on active */
}

.gpay-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gpay-title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    width: 100%; /* Ensure it takes full width */
    display: block; /* Ensure it behaves as a block element */
}

.gpay-price {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 25px;
    animation: fadeIn 0.8s ease-out 3s forwards;
    opacity: 0;
}

@keyframes fadeInJump {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.gpay-loader.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.1);
    }
}
