/* Stripe wallet + payment element styles */

.digital-wallet-checkout {
    margin: 0 0 12px;
    padding: 0;
    width: 100%;
    clear: both;
}

#digital-wallet-buttons {
    margin-bottom: 8px;
}

.wallet-pay-divider {
    display: none;
    width: 100%;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
    color: #777;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.wallet-pay-divider::before,
.wallet-pay-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

/* Container Styles */
.payment-element-container {
    margin: 0;
    padding: 0;
}

.payment-element-customer-hint {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

#payment-element-shell {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#payment-element {
    margin-bottom: 15px;
}

/* Payment Element Submit Button - Customizable Styles */
#payment-element-submit {
    /* Colors */
    background: #5469d4;
    color: #ffffff;
    
    /* Typography */
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    
    /* Spacing */
    padding: 12px 16px;
    margin-top: 10px;
    margin-bottom: 0;
    
    /* Layout */
    width: 100%;
    display: block;
    
    /* Border & Shape */
    border-radius: 4px;
    border: 0;
    
    /* Effects */
    box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
    transition: all 0.2s ease;
    cursor: pointer;
}

#payment-element-submit:hover {
    filter: contrast(115%);
}

#payment-element-submit:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Spinner for loading state */
.payment-element-spinner {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #5469d4;
    width: 20px;
    height: 20px;
    animation: payment-element-spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

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

.payment-element-hidden {
    display: none !important;
}

/* Payment Message/Error Display - Customizable Styles */
#payment-message {
    /* Typography */
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    font-family: inherit;

    /* Spacing */
    padding: 12px;
    margin: 12px 0 0;

    /* Layout */
    text-align: left;
}

/* ID selectors must beat Bootstrap .alert-* so dark-theme venue
   overrides cannot leave light text on a light alert background. */
#payment-message.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

#payment-message.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
}

#payment-message.alert-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

#payment-message ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    list-style-type: disc;
}

#payment-message li {
    margin: 4px 0;
    line-height: 1.5;
}

/* Stripe Elements Appearance - Customizable Styles */
.StripeElement {
    /* Colors */
    background-color: white;
    border: 1px solid #e0e0e0;
    
    /* Spacing */
    padding: 16px;
    margin: 0;
    
    /* Shape */
    border-radius: 4px;
}

.StripeElement--focus {
    border-color: #5469d4;
}

.StripeElement--invalid {
    border-color: #dc3545;
}

/* Invalid field highlighting */
input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

input.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Payment Element active: hide the duplicate legacy card UI (thecomedypark7).
   Nycc2 equivalent lives in nycc-override-new.css keyed on .events_checkout_page. */
.--tpl-accc2 .payment-form.pe-checkout:not(.pe-legacy-active) .payment-section,
.--tpl-accc2 .payment-form.pe-checkout:not(.pe-legacy-active) .exp-date,
.--tpl-accc2 .payment-form.pe-checkout:not(.pe-legacy-active) .multi-exp,
.--tpl-accc2 .payment-form.pe-checkout:not(.pe-legacy-active) #legacy-purchase-button {
    display: none !important;
}

