/* Bajaj EMI Product Page Styles */

.bajaj-emi-calculator {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bajaj-emi-title {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.bajaj-logo {
    height: 28px;
    width: auto;
    margin-right: 12px;
}

/* Product Price Display */
.bajaj-emi-controls {
    margin-bottom: 20px;
}

.product-price-section {
    margin-bottom: 20px;
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border: 2px solid #007cba;
    border-radius: 8px;
    margin-bottom: 16px;
}

.price-label {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #007cba;
}

/* Fetch Button */
.bajaj-fetch-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bajaj-fetch-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.bajaj-fetch-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Schemes Container */
.schemes-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.schemes-list h4 {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
}

/* Schemes Grid */
.schemes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.scheme-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.scheme-card:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
}

.scheme-card.selected {
    border-color: #007cba;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
}

.scheme-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.emi-amount {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
}

.emi-amount .period {
    font-size: 14px;
    font-weight: 400;
    color: #6c757d;
}

.tenure {
    background: #007cba;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Scheme Details */
.scheme-details {
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 4px 0;
}

.detail-item .label {
    color: #6c757d;
    font-size: 14px;
}

.detail-item .value {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

/* Apply Button */
.scheme-actions {
    text-align: center;
}

.apply-emi-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.apply-emi-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Loading States */
.schemes-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.emi-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 16px;
    border-radius: 6px;
    text-align: center;
}

.no-schemes {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-schemes p {
    margin: 0;
    font-size: 16px;
}

/* Footer */
.bajaj-emi-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #dee2e6;
}

.disclaimer {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bajaj-emi-calculator {
        padding: 16px;
        margin: 15px 0;
    }
    
    .bajaj-emi-title {
        font-size: 16px;
    }
    
    .bajaj-logo {
        height: 24px;
    }
    
    .price-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .price-amount {
        font-size: 20px;
        align-self: flex-end;
    }
    
    .schemes-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .scheme-card {
        padding: 16px;
    }
    
    .scheme-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .emi-amount {
        font-size: 20px;
    }
    
    .bajaj-fetch-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .price-display {
        padding: 10px 12px;
    }
    
    .price-label {
        font-size: 14px;
    }
    
    .price-amount {
        font-size: 18px;
    }
    
    .detail-item {
        font-size: 13px;
    }
    
    .scheme-main .tenure {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Integration with WooCommerce themes */
.woocommerce div.product .bajaj-emi-calculator {
    margin: 20px 0;
}

.woocommerce div.product .summary .bajaj-emi-calculator {
    clear: both;
}