/**
 * Payment Styles for Legend Card Hub
 * 
 * This stylesheet contains all styles related to the payment modal
 * and payment-related UI elements.
 */

/* Payment Modal Container */
.payment-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

/* Payment Modal */
.payment-modal {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    padding: 30px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideIn 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: #4CAF50 #f0f0f0;
}

/* Custom scrollbar styling for webkit browsers */
.payment-modal::-webkit-scrollbar {
    width: 8px;
}

.payment-modal::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.payment-modal::-webkit-scrollbar-thumb {
    background-color: #4CAF50;
    border-radius: 10px;
    border: 2px solid #f0f0f0;
}

/* Close Button */
.payment-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #777;
    transition: color 0.3s;
}

.payment-close-btn:hover {
    color: #333;
}

/* Payment Header */
.payment-header {
    text-align: center;
    margin-bottom: 20px;
}

.payment-logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* Toggle Container */
.toggle-container {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 30px;
    position: relative;
    margin-bottom: 30px;
    overflow: hidden;
}

.toggle-btn {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    position: relative;
    z-index: 2;
    transition: color 0.3s;
    font-weight: 500;
}

.toggle-btn.active {
    color: #fff;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: #4CAF50;
    border-radius: 30px;
    transition: transform 0.3s ease;
}

/* Item Details */
.item-details {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.item-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
}

#item-info {
    font-weight: bold;
    margin-bottom: 5px;
}

#item-price {
    color: #4CAF50;
    font-weight: bold;
}

/* Form Styles */
.form-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #4CAF50;
    outline: none;
}

.save-payment-method {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.save-payment-method input {
    margin-right: 10px;
}

.submit-btn {
    width: 100%;
    padding: 12px 0;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #45a049;
}

/* PayPal Form */
.paypal-info {
    text-align: center;
    margin-bottom: 20px;
}

/* Saved Payment Methods */
#saved-payment-methods {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

#saved-payment-methods h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.saved-payment-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
}

.payment-method-info {
    display: flex;
    align-items: center;
}

.card-icon {
    margin-right: 10px;
    font-size: 20px;
}

.card-number {
    font-weight: bold;
    margin-right: 10px;
}

.card-expiry {
    color: #777;
    font-size: 14px;
}

.use-payment-method {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.use-payment-method:hover {
    background-color: #45a049;
}

/* Purchased Label */
.purchased-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}



/* Responsive Styles */
@media (max-width: 600px) {
    .payment-modal {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .payment-logo {
        font-size: 20px;
    }
}