/**
 * WhatsApp Payment for WooCommerce CSS
 */

.whatsapp-payment-button {
    margin: 20px 0;
    text-align: center;
}

.whatsapp-payment-button a {
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    font-weight: bold;
    border: none;
    transition: background-color 0.3s ease;
}

.whatsapp-payment-button a:hover {
    background-color: #128C7E;
    color: white;
}

.whatsapp-payment-button img {
    vertical-align: middle;
    margin-right: 8px;
    width: 20px;
    height: 20px;
}

/* Payment Methods Styling */
.whatsapp-payment-methods {
    margin: 30px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.whatsapp-payment-methods h2 {
    text-align: center;
    margin-bottom: 20px;
}

.whatsapp-payment-methods p {
    text-align: center;
    margin-bottom: 25px;
}

.whatsapp-payment-methods-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    margin: 0 auto;
}

.whatsapp-payment-method {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing */
    max-width: 33.333%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 280px; /* Increased minimum height for consistency */
}

.whatsapp-payment-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.payment-method-info {
    margin-bottom: 15px;
    flex-grow: 1; /* Makes all info sections the same height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.whatsapp-payment-method h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    font-weight: 600;
}

.discount-info, .no-discount-info {
    display: inline-block;
    background-color: #ff6b6b;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.no-discount-info {
    background-color: #6c757d;
}

.price-section {
    margin: 15px 0 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-info {
    text-align: center;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
    font-size: 14px;
}

.discounted-price, .regular-price {
    font-weight: bold;
    color: #ff6b6b;
    font-size: 18px;
}

.regular-price {
    color: #333;
}

.description-section {
    margin-top: auto;
    padding-top: 15px;
}

.method-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 0;
    line-height: 1.4;
    text-align: center;
}

.method-description-extra {
    color: #888;
    font-size: 11px;
    margin-top: 5px;
    font-style: italic;
    line-height: 1.3;
    text-align: center;
}

.whatsapp-button {
    background-color: #25D366;
    color: white;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 4px;
    display: block;
    font-weight: bold;
    border: none;
    transition: background-color 0.3s ease;
    text-align: center;
    width: 100%;
    font-size: 14px;
    margin-top: auto; /* Pushes button to bottom */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whatsapp-button:hover {
    background-color: #128C7E;
    color: white;
}

.whatsapp-button img {
    vertical-align: middle;
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

/* Specific payment method styling */
.bank-transfer {
    border-top: 4px solid #4a6fa5;
    background-color: #f8faff;
}

.e-wallet {
    border-top: 4px solid #6a89cc;
    background-color: #f7f9ff;
}

.credit-card {
    border-top: 4px solid #786fa6;
    background-color: #f9f7ff;
}

/* Wallet Icons Styling */
.wallet-icons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0px;
    margin: 10px 0 20px;
    padding: 5px;
    max-width: 100%;
    overflow: hidden;
}

.wallet-icon {
    width: 50px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.2s ease;
    margin: 2px;
}

.wallet-icon:hover {
    transform: scale(1.2);
    z-index: 1;
}

/* Credit Card Image Styling */
.credit-card-image-container {
    display: flex;
    justify-content: center;
    margin: 10px 0 20px;
    padding: 5px;
}

.credit-card-image {
    max-width: 90%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.credit-card-image:hover {
    transform: scale(1.05);
}

/* Bank Transfer Image Styling */
.bank-transfer-image-container {
    display: flex;
    justify-content: center;
    margin: 10px 0 20px;
    padding: 5px;
}

.bank-transfer-image {
    max-width: 90%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.bank-transfer-image:hover {
    transform: scale(1.05);
}

/* Admin styles */
.whatsapp-admin-button {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: white !important;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.whatsapp-admin-button:hover {
    background-color: #128C7E !important;
    border-color: #128C7E !important;
}

.whatsapp-admin-payment-methods {
    margin-bottom: 15px;
}

.whatsapp-admin-payment-method {
    margin-bottom: 10px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .whatsapp-payment-methods-container {
        flex-wrap: wrap;
    }
    
    .whatsapp-payment-method {
        max-width: 48%;
        flex: 0 0 48%;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .whatsapp-payment-methods-container {
        flex-direction: column;
    }
    
    .whatsapp-payment-method {
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .wallet-icons-container {
        gap: 0px;
    }
    
    .wallet-icon {
        width: 70px;
        height: 30px;
    }
    
    .credit-card-image,
    .bank-transfer-image {
        max-width: 90%;
    }
}