/*
 * Payment Gateway Styles for Kundli Cosmic Theme
 * 
 * Custom styling for Cashfree and other payment gateways
 * with cosmic design integration
 */

/* Payment Method Selection */
.wc_payment_methods,
.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.wc_payment_method,
.payment_method {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.wc_payment_method:hover,
.payment_method:hover {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
    transform: translateY(-2px);
}

.wc_payment_method input[type="radio"] {
    display: none;
}

.wc_payment_method label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.5rem;
    cursor: pointer;
    position: relative;
    color: var(--star-white);
    font-weight: 500;
    transition: all 0.3s ease;
}

.wc_payment_method label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wc_payment_method input[type="radio"]:checked + label::before {
    background: var(--gradient-gold);
    border-color: var(--primary-gold);
    box-shadow: inset 0 0 0 3px var(--cosmic-blue);
}

.wc_payment_method input[type="radio"]:checked + label {
    color: var(--primary-gold);
    background: rgba(255, 215, 0, 0.1);
}

.payment_method_icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 5px;
}

/* Cashfree Specific Styles */
.payment_method_cashfree label {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(66, 133, 244, 0.1));
}

.payment_method_cashfree input[type="radio"]:checked + label {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.2), rgba(66, 133, 244, 0.2));
    border-color: #1a73e8;
}

.payment_method_cashfree input[type="radio"]:checked + label::before {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border-color: #1a73e8;
}

/* Payment Box */
.payment_box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
    color: var(--silver-mist);
    line-height: 1.6;
}

.payment_box::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 215, 0, 0.2);
}

/* Checkout Form Styling */
.cosmic-form-field {
    margin-bottom: 1.5rem;
}

.cosmic-form-field label {
    display: block;
    color: var(--star-white);
    font-weight: 500;
    margin-bottom: 8px;
}

.cosmic-form-field .required {
    color: #ff6b6b;
}

.cosmic-form-field input[type="text"],
.cosmic-form-field input[type="email"],
.cosmic-form-field input[type="tel"],
.cosmic-form-field select,
.cosmic-form-field textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--star-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cosmic-form-field input[type="text"]:focus,
.cosmic-form-field input[type="email"]:focus,
.cosmic-form-field input[type="tel"]:focus,
.cosmic-form-field select:focus,
.cosmic-form-field textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.cosmic-form-field input::placeholder,
.cosmic-form-field textarea::placeholder {
    color: var(--silver-mist);
    opacity: 0.7;
}

/* Checkout Summary */
.order-review,
.woocommerce-checkout-review-order {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 2rem;
}

.order-review h3,
.woocommerce-checkout-review-order h3 {
    color: var(--primary-gold);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.shop_table th,
.shop_table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    color: var(--star-white);
}

.shop_table th {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-gold);
    font-weight: 600;
    text-align: left;
}

.shop_table .cart_item:hover {
    background: rgba(255, 215, 0, 0.05);
}

.shop_table .order-total td {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-gold);
    border-top: 2px solid rgba(255, 215, 0, 0.3);
}

/* Place Order Button */
#place_order,
.place-order-button {
    width: 100%;
    background: var(--gradient-gold);
    color: var(--cosmic-blue);
    padding: 18px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-gold);
    margin-top: 1rem;
}

#place_order:hover,
.place-order-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

#place_order:active,
.place-order-button:active {
    transform: translateY(-1px);
}

/* Payment Processing */
.payment-processing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 5, 31, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.payment-spinner {
    text-align: center;
    color: var(--star-white);
}

.payment-spinner .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.payment-spinner h3 {
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.payment-spinner p {
    color: var(--silver-mist);
    font-size: 0.9rem;
}

/* Success/Error Messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid;
    position: relative;
}

.woocommerce-message {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.woocommerce-error {
    border-left-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.woocommerce-info {
    border-left-color: var(--primary-gold);
    background: rgba(255, 215, 0, 0.1);
}

.woocommerce-message::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #28a745;
    margin-right: 10px;
}

.woocommerce-error::before {
    content: '\f00d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #dc3545;
    margin-right: 10px;
}

.woocommerce-info::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-gold);
    margin-right: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wc_payment_methods,
    .payment_methods {
        padding: 1rem;
    }
    
    .wc_payment_method label {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .payment_box {
        padding: 1rem;
    }
    
    .order-review,
    .woocommerce-checkout-review-order {
        padding: 1.5rem;
    }
    
    .shop_table {
        font-size: 0.9rem;
    }
    
    .shop_table th,
    .shop_table td {
        padding: 8px 10px;
    }
    
    #place_order,
    .place-order-button {
        padding: 15px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cosmic-form-field input,
    .cosmic-form-field select,
    .cosmic-form-field textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .payment-spinner .spinner {
        width: 50px;
        height: 50px;
    }
    
    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}
