/* ========================================
   PARTIAL PAYMENTS - COMPACT & CLEAN DESIGN
   ======================================== */

/* Payment Form Card */
.payment-form-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

/* Form Header */
.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.form-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-header-icon {
    width: 24px;
    height: 24px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-header-icon svg {
    width: 12px;
    height: 12px;
    color: #ffffff;
}

.form-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.form-header-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Amount Input Section */
.amount-input-section {
    margin-bottom: 16px;
    width: 100%;
    overflow: hidden;
}

.amount-input-wrapper {
    position: relative;
    margin-bottom: 8px;
    width: 100%;
    overflow: hidden;
}

.currency-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    z-index: 2;
    pointer-events: none;
}

.amount-input {
    width: 100%;
    padding: 10px 10px 10px 28px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    background: #ffffff;
    transition: all 0.2s ease;
    text-align: right;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amount-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.amount-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.amount-input.disabled {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
    border-color: #d1d5db;
}

.amount-input.disabled:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

.amount-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.amount-validation {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.field-note {
    color: #3b82f6;
    font-style: italic;
}

/* Quick Amount Buttons */
.quick-amount-section {
    margin-bottom: 20px;
}

.quick-amount-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 8px 0;
}

.quick-amount-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.quick-amount-btn {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-amount-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.quick-amount-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2);
}

.quick-amount-btn.full-amount {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
}

.quick-amount-btn.full-amount:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-amount {
    display: block;
    font-weight: 500;
}

/* Settings Notification */
.settings-notification {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #1d4ed8;
}

.settings-notification i {
    color: #3b82f6;
    font-size: 14px;
}

.settings-notification span {
    line-height: 1.4;
}

/* Payment Action */
.payment-action {
    text-align: center;
}

.payment-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

.payment-submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.payment-submit-btn:active {
    transform: translateY(0);
}

.payment-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-text {
    font-weight: 600;
}

.btn-icon {
    display: flex;
    align-items: center;
}

.btn-icon svg {
    transition: transform 0.2s ease;
    width: 14px;
    height: 14px;
}

.payment-submit-btn:hover .btn-icon svg {
    transform: translateX(1px);
}

/* Loading State */
.payment-submit-btn.loading {
    pointer-events: none;
}

.payment-submit-btn.loading .btn-text {
    opacity: 0.7;
}

.payment-submit-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success State */
.payment-submit-btn.success {
    background: #10b981;
}

/* Error State */
.payment-submit-btn.error {
    background: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-form-card {
        padding: 16px;
        border-radius: 6px;
    }
    
    .form-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .form-header h4 {
        font-size: 13px;
    }
    
    .form-header-subtitle {
        font-size: 12px;
    }
    
    .amount-input {
        font-size: 14px;
        padding: 8px 8px 8px 24px;
    }
    
    .currency-prefix {
        font-size: 13px;
        left: 10px;
    }
    
    .quick-amount-buttons {
        gap: 6px;
    }
    
    .quick-amount-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .payment-submit-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .payment-form-card {
        padding: 12px;
    }
    
    .form-header {
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .form-header h4 {
        font-size: 13px;
    }
    
    .amount-input {
        font-size: 15px;
        padding: 10px 10px 10px 28px;
    }
    
    .currency-prefix {
        font-size: 14px;
        left: 12px;
    }
    
    .quick-amount-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    
    .quick-amount-btn {
        min-height: 28px;
    }
    
    .payment-submit-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .payment-submit-btn,
    .quick-amount-btn,
    .amount-input,
    .progress-fill {
        transition: none;
    }
    
    .payment-submit-btn:hover .btn-icon svg {
        transform: none;
    }
}

/* Focus States for Accessibility */
.payment-submit-btn:focus,
.quick-amount-btn:focus,
.amount-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .payment-form-card {
        border: 2px solid #000000;
    }
    
    .amount-input {
        border: 2px solid #000000;
    }
    
    .quick-amount-btn {
        border: 2px solid #000000;
    }
}

/* Dark Mode Support - Disabled to maintain consistent light theme */
/* @media (prefers-color-scheme: dark) {
    .payment-form-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .form-header h4 {
        color: #f9fafb;
    }
    
    .amount-label {
        color: #d1d5db;
    }
    
    .amount-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .currency-prefix {
        color: #9ca3af;
    }
    
    .quick-amount-btn {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .quick-amount-btn:hover {
        background: #4b5563;
    }
} */

/* Hide payment history and partial payments in print/PDF */
@media print {
    .payment-history-section,
    .partial-payment-form,
    .payment-form-card,
    .payment-history-container,
    .payment-history-header,
    .payment-history-table,
    .quick-amount-section,
    .amount-input-section {
        display: none !important;
    }
}

/* Hide payment history and partial payments in PDF generation */
@media screen and (max-width: 1px) {
    .payment-history-section,
    .partial-payment-form,
    .payment-form-card,
    .payment-history-container,
    .payment-history-header,
    .payment-history-table,
    .quick-amount-section,
    .amount-input-section {
        display: none !important;
    }
}
