/* Stripe-Like Font */
.checkout-wrapper body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", "Ubuntu", sans-serif;
}

/* Centered Checkout Box */
.checkout-wrapper .checkout-container {
    background: white;
    width: 100%;
    box-sizing: border-box;
    padding: 0px;
}

/* Section Titles */
.checkout-section-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #444A4F !important; /* Grey color */
    margin: 10px 0 10px; /* Spacing for all except first */
}

/* Remove extra space at the top of the first section */
.checkout-section-title:first-of-type {
    margin-top: 0;
}

/* Input Fields */
.input-group {
    margin-bottom: 12px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    box-sizing: border-box;
    color: #111; /* Darker text for better readability */
}

/* Placeholder Text */
.input-group input::placeholder,
.input-group select {
    color: #6B6B6B; /* Darker placeholder text */
}

/* Side-by-Side Inputs */
.input-row {
    display: flex;
    gap: 10px;
}

.input-row .input-group {
    flex: 1;
}


/* Error Message Box */
.checkout-error {
    background-color: #fef6f6; /* Light red background */
    color: #400404; /* Text color */
    border: 1px solid #fdd8d8;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
}

/*Country Selection*/
select {
    font-size: 14px;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: white !important;
}

/* Expiry & CVV Side by Side */
.expiry-cvv-container {
    display: flex;
    gap: 10px; /* Keep spacing between expiry & CVV */
    align-items: center; /* Ensure fields and messages align properly */

}

.expiry-cvv-container .input-group {
    flex: 1;
}

/* Default card field styling */
#cardNumber, #cardExpiry, #cardSecurityCode {
    border: 1px solid #dcdcdc;
    transition: border 0.3s ease-in-out;
}

/* Standardized error messages for all fields */
.validation-message {
    color: #dc2727;
    font-size: 12px; /* Matches name validation */
    margin-top: 0px;
    padding: 0px;
}

/* Fix error message positioning */
#card-error-message {
    font-size: 12px;
    color: #dc2727;
    text-align: left;
    position: relative; /* No forced margins, just proper positioning */
    margin-top: -5px;
    margin-bottom: 5px;
}

/* Softer red border for invalid fields */
.invalid-field {
    border: 1px solid #e74c3c !important; /* Softer red */
    background-color: rgba(231, 76, 60, 0.05); /* Light red background */
    transition: border 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

/* Submit Button */
/* Button Styling */
#checkout-btn,
.loading-btn {
    position: relative;
    width: 100%;
    height: 48px;
    background-color: black;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#checkout-btn:hover {
    opacity: 0.8;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: 0;
    margin-left: 0;
    /* transform: translate(-50%, -50%); */
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 17px;
    height: 17px;
    animation: spin 0.8s linear infinite;
    pointer-events: none;
    z-index: 2;
}

#checkout-btn.loading .btn-text {
    opacity: 0.4;
}

.hidden {
    display: none;
}

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

/* Document Ready Notification in Checkout */
.document-ready-checkout {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.document-ready-checkout .checkmark-icon {
    flex-shrink: 0;
}

.document-ready-checkout .ready-text {
    font-size: 13px;
    font-weight: 500;
    color: #166534;
}


.apple-pay-wrap {
    width: 100%;
}

.apple-pay-wrap.is-hidden,
.checkout-credit-card.is-hidden {
    display: none;
}

.apple-pay-button {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
}

.apple-pay-button {
    background: #000;
    color: #fff;
    font-family: SF Pro, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 30px;
    letter-spacing: 0;
}

@media (hover: hover) and (pointer: fine) {
    .apple-pay-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
    }
}

.apple-pay-error {
    display: none;
    margin-top: 8px;
    color: #dc2727;
    font-size: 12px;
    line-height: 1.4;
}

.checkout-credit-card {
    color: #8C8CA1;
    margin: 6px 0;
    font-size: 12px;
}


