/* iyzico Installment Table Styles - Bank Card Layout */

.iyzico-installment-wrapper {
    padding: 20px 0;
}

.iyzico-installment-wrapper h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.installment-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* Error Message */
.iyzico-error-message {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.iyzico-error-message h4 {
    color: #856404;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.iyzico-error-message p {
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
    margin: 8px 0;
}

.iyzico-error-message .button {
    margin-top: 10px;
    background: #ff9800;
    border-color: #ff9800;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    font-weight: 500;
}

.iyzico-error-message .button:hover {
    background: #f57c00;
    border-color: #f57c00;
}

/* Bank Cards Grid */
.iyzico-bank-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.bank-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bank-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #2196F3;
}

/* Bank Card Header */
.bank-card-header {
    color: #333;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bank-logo {
    height: 32px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
}

.bank-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 48px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.bank-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

/* Card Info Badge */
.card-info-badge {
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-family {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-association {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-type {
    background: #e8f5e9;
    color: #388e3c;
}

.badge-commercial {
    background: #fff3e0;
    color: #f57c00;
}

.badge-3ds {
    background: #fce4ec;
    color: #c2185b;
}

/* Bank Card Body */
.bank-card-body {
    padding: 0;
}

/* Installment Table */
.installment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 0px !important;
}

table.installment-table {
    margin-top: 0px !important;
}

.installment-table thead {
    background: #f8f9fa;
}

.installment-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.installment-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.installment-table tbody tr:last-child {
    border-bottom: none;
}

.installment-table tbody tr:hover {
    background-color: #f8f9fa;
}

.installment-table tbody tr.single-payment-row {
    background-color: #e8f5e9;
    font-weight: 600;
}

.installment-table tbody tr.single-payment-row:hover {
    background-color: #c8e6c9;
}

.installment-table td {
    padding: 14px 16px;
    color: #333;
}

.installment-table td.installment-count {
    font-weight: 600;
    color: #2196F3;
    width: 30%;
}

.installment-table tr.single-payment-row td.installment-count {
    color: #4CAF50;
}

.installment-table td.installment-price {
    font-weight: 600;
    width: 35%;
}

.installment-table td.total-price {
    font-weight: 700;
    font-size: 15px;
    width: 35%;
}

/* Installment Note */
.installment-note {
    background: #f8f9fa;
    border-left: 4px solid #2196F3;
    padding: 16px 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.installment-note p {
    font-size: 12px;
    color: #666;
    margin: 4px 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .iyzico-bank-cards {
        grid-template-columns: 1fr;
    }
    
    .iyzico-installment-wrapper h3 {
        font-size: 20px;
    }
    
    .installment-table {
        font-size: 13px;
    }
    
    .installment-table thead th {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .installment-table td {
        padding: 12px;
    }
    
    .bank-name {
        font-size: 16px;
    }
    
    .bank-logo {
        height: 28px;
        max-width: 50px;
    }
    
    .bank-logo-placeholder {
        height: 28px;
        width: 40px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .iyzico-installment-wrapper {
        padding: 15px 0;
    }
    
    .bank-card-header {
        padding: 12px 16px;
    }
    
    .installment-table {
        font-size: 12px;
    }
    
    .installment-table thead th,
    .installment-table td {
        padding: 10px;
    }
    
    .bank-name {
        font-size: 14px;
    }
    
    .bank-logo {
        height: 24px;
        max-width: 45px;
    }
    
    .bank-logo-placeholder {
        height: 24px;
        width: 36px;
        font-size: 11px;
    }
}

/* WooCommerce Tab Integration */
.woocommerce-tabs .panel#tab-iyzico_installment {
    padding: 0;
}

.woocommerce-tabs ul.tabs li.iyzico_installment_tab a {
    color: #2196F3;
    font-weight: 600;
}

.woocommerce-tabs ul.tabs li.iyzico_installment_tab.active a {
    color: #4CAF50;
}
