/* ========================================
   PAYMENT METHODS COMPONENT CSS
   For Step 3 Billing Information Only
   ======================================== */

/* Payment Method Selector */
.payment-method-selector {
    margin-bottom: 2rem;
}

.payment-method-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-method-title i {
    color: #5598E9;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .payment-methods-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.payment-method-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method-card {
    border: 2px solid #E8E9EA;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    background: #FFFFFF;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(85, 152, 233, 0.1), rgba(191, 218, 164, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.payment-method-card > * {
    position: relative;
    z-index: 2;
}

.payment-method-card:hover {
    border-color: #5598E9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(85, 152, 233, 0.15);
}

.payment-method-card:hover::before {
    opacity: 1;
}

.payment-method-card.active {
    border-color: #5598E9;
    background: linear-gradient(135deg, #5598E9, #BFDAA4);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 152, 233, 0.25);
}

.payment-method-card.active::before {
    display: none;
}

.payment-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #5598E9;
}

.payment-method-card.active .payment-icon {
    color: #FFFFFF;
}

.payment-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #2C3E50;
}

.payment-method-card.active .payment-label {
    color: #FFFFFF;
}

.payment-description {
    font-size: 0.75rem;
    color: #7F8C8D;
    line-height: 1.3;
}

.payment-method-card.active .payment-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Payment Form Container Styles */
.payment-form-container {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: none;
}

.payment-form-container:not([style*="display: none"]) {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* PayPal Specific Styles */
.paypal-container {
    text-align: center;
    padding: 1.5rem;
    border: 2px solid #E8E9EA;
    border-radius: 12px;
    background: #FAFBFC;
}

.paypal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0070BA;
    margin-bottom: 1rem;
}

.paypal-logo i {
    font-size: 2rem;
}

.paypal-info p {
    color: #2C3E50;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.paypal-buttons {
    margin-bottom: 1rem;
}

/* Google Pay Specific Styles */
.google-pay-container {
    text-align: center;
    padding: 1.5rem;
    border: 2px solid #E8E9EA;
    border-radius: 12px;
    background: #FAFBFC;
}

.google-pay-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #4285F4;
    margin-bottom: 1rem;
}

.google-pay-logo i {
    font-size: 2rem;
}

.google-pay-info p {
    color: #2C3E50;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.google-pay-button {
    margin-bottom: 1rem;
}

.google-pay-stripe-info {
    text-align: center;
    padding: 1rem;
    background: #f8f9ff;
    border: 1px solid #e3e8ff;
    border-radius: 8px;
    color: #4285F4;
}

.google-pay-stripe-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.google-pay-stripe-info i {
    color: #4285F4;
    margin-right: 0.5rem;
}

/* Apple Pay Specific Styles */
.apple-pay-container {
    text-align: center;
    padding: 1.5rem;
    border: 2px solid #E8E9EA;
    border-radius: 12px;
    background: #FAFBFC;
}

.apple-pay-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1rem;
}

.apple-pay-logo i {
    font-size: 2rem;
}

.apple-pay-info p {
    color: #2C3E50;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.apple-pay-button {
    margin-bottom: 1rem;
}

.apple-pay-stripe-info {
    text-align: center;
    padding: 1rem;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    color: #333;
}

.apple-pay-stripe-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.apple-pay-stripe-info i {
    color: #000;
    margin-right: 0.5rem;
}

.apple-pay-unavailable {
    text-align: center;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

.apple-pay-unavailable p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.apple-pay-unavailable i {
    color: #856404;
    margin-right: 0.5rem;
}

/* Update the card display to be conditional for Stripe */
.card-display-container {
    display: block;
    transition: all 0.3s ease;
}

.card-display-container.hidden {
    display: none !important;
}

/* Responsive payment methods */
@media (max-width: 576px) {
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-method-card {
        padding: 0.75rem;
    }
    
    .payment-icon {
        font-size: 1.5rem;
    }
}

/* Stripe specific styling */
.stripe-card-wrapper {
    padding: 1rem;
    border: 2px solid #E8E9EA;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.stripe-card-wrapper:focus-within {
    border-color: #5598E9;
    box-shadow: 0 0 0 3px rgba(85, 152, 233, 0.1);
}

.stripe-card-element {
    min-height: 20px;
}

.stripe-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #a8071a;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.form-error {
    color: #df1b41;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Ensure proper display states */
#stripe-payment-form {
    display: block;
}

#paypal-payment-form,
#google-pay-payment-form,
#apple-pay-payment-form {
    display: none;
}
