/* Dabiryab Installment Common Styles */

/* Global Installment Styles */
.installment-card {
    position: relative;
    overflow: hidden;
}

.installment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa 0%, #28a745 50%, #ffc107 100%);
}

/* Installment Badge */
.installment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.3);
}

.installment-badge::before {
    content: '💳';
    font-size: 12px;
}

/* Payment Status Indicators */
.payment-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.payment-status-indicator.paid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-status-indicator.paid::before {
    content: '✅';
}

.payment-status-indicator.unpaid {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.payment-status-indicator.unpaid::before {
    content: '⏳';
}

.payment-status-indicator.pending {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.payment-status-indicator.pending::before {
    content: '🔄';
}

/* Installment Progress Bar */
.installment-progress {
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.installment-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.installment-progress-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.installment-progress-percentage {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.installment-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.installment-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.5s ease;
    position: relative;
}

.installment-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Installment Summary Cards */
.installment-summary-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.installment-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.installment-summary-card.installment-card {
    border-left: 4px solid #0073aa;
}

.installment-summary-card.regular-card {
    border-left: 4px solid #6c757d;
}

/* Installment Actions */
.installment-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.installment-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.installment-actions .button-primary {
    background: #0073aa;
    color: white;
}

.installment-actions .button-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.installment-actions .button-secondary {
    background: #6c757d;
    color: white;
}

.installment-actions .button-secondary:hover {
    background: #5a6268;
}

.installment-actions .button-success {
    background: #28a745;
    color: white;
}

.installment-actions .button-success:hover {
    background: #218838;
}

.installment-actions .button-warning {
    background: #ffc107;
    color: #212529;
}

.installment-actions .button-warning:hover {
    background: #e0a800;
}

/* Installment Notifications */
.installment-notification {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    border-left: 4px solid;
    font-size: 14px;
    font-weight: 500;
}

.installment-notification.success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.installment-notification.error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.installment-notification.warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.installment-notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Installment Loading States */
.installment-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.installment-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Installment Form Elements */
.installment-form-group {
    margin-bottom: 20px;
}

.installment-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.installment-form-group input,
.installment-form-group select,
.installment-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.installment-form-group input:focus,
.installment-form-group select:focus,
.installment-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 0.2rem rgba(0, 115, 170, 0.25);
}

.installment-form-group .form-help {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .installment-actions {
        flex-direction: column;
    }
    
    .installment-actions .button {
        width: 100%;
        justify-content: center;
    }
    
    .installment-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .installment-summary-card {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .installment-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .payment-status-indicator {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .installment-progress {
        padding: 10px;
    }
    
    .installment-summary-card {
        padding: 10px;
        margin: 8px 0;
    }
}

/* Print Styles */
@media print {
    .installment-actions,
    .installment-loading::after {
        display: none !important;
    }
    
    .installment-card {
        border: 1px solid #000 !important;
        background: white !important;
    }
    
    .installment-badge {
        background: #000 !important;
        color: white !important;
    }
    
    .payment-status-indicator {
        border: 1px solid #000 !important;
        background: white !important;
        color: #000 !important;
    }
}
