/* Message container */
#payment-message-container {
    display: none;
    margin-bottom: 15px;
}

.message {
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.message.success {
    background-color: #28a745;
    color: #fff;
}

.message.error {
    background-color: #dc3545;
    color: #fff;
}

.table_my_account_payment_methods {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table_my_account_payment_methods th, 
.table_my_account_payment_methods td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.table_my_account_payment_methods th {
    background-color: #f5f5f5;
}

.remove-payment-method {
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
}

.remove-payment-method:hover {
    background-color: #c82333;
}

/* Loading effect */
.loading-effect {
    animation: flash-effect 1.5s linear infinite;
    opacity: 0.4;
}

.woocommerce-PaymentMethod {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between the radio button and label */
}

/* Flex container for the label to align the name and icon side by side */
.woocommerce-PaymentMethod label {
    display: flex;
    align-items: center;
    gap: 5px; /* Space between the name and icon */
    margin: 0; /* Remove extra spacing */
}

/* Ensure the radio button and label are close together */
.woocommerce-PaymentMethod .input-radio {
    margin-right: 10px; /* Space between the radio button and the label */
}

.woocommerce-PaymentMethod label img {
    margin-left: 10px; /* Add space between the name and the icon */
    max-width: 40px; /* Set a max width for the icon */
    height: auto; /* Maintain the aspect ratio */
}


/* Style the payment method list */
.woocommerce-PaymentMethods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr; /* Default to 1 column on small screens */
    gap: 10px; /* Space between cards */
}

/* Card style for payment methods */
.payment-method-card {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    width: 100%; /* Ensure full width inside the grid */
    box-sizing: border-box;
}

.payment-method-card:hover {
    background-color: #f1f1f1;
}

/* Align the radio button and icon horizontally */
.payment-method-card input.input-radio {
    margin-right: 15px;
    flex-shrink: 0;
}

.payment-method-card label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.payment-method-card img.payment-icon {
    margin-right: 10px;
    height: 32px; /* Increased icon size */
    width: auto;
}

/* Grid layout for larger screens */
@media (min-width: 768px) {
    .woocommerce-PaymentMethods {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid layout */
    }
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    .payment-method-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-method-card input.input-radio {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .payment-method-card label {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-method-card img.payment-icon {
        margin-right: 0;
        margin-bottom: 10px;
        height: 28px; /* Adjust icon size for smaller screens */
    }
}
