/**
 * Enhanced Frontend CSS for Custom Form Builder with OCR and File Upload Support
 */

/* Form Container */
.cfb-form-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.cfb-form {
    background: #ffffff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Form Title */
.cfb-form-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Form Fields */
.cfb-form-fields {
    margin-bottom: 20px;
}

.cfb-field-wrapper {
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.cfb-field-wrapper:hover {
    transform: translateY(-1px);
}

.cfb-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cfb-required {
    color: #dc3545;
    margin-left: 3px;
    font-weight: bold;
}

.cfb-field-input {
    position: relative;
}

/* Input Styles */
.cfb-input,
.cfb-textarea,
.cfb-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.cfb-input:focus,
.cfb-textarea:focus,
.cfb-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    transform: translateY(-1px);
}

.cfb-textarea {
    resize: vertical;
    min-height: 100px;
}

.cfb-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Enhanced File Upload Styling */
.cfb-file-upload-container {
    position: relative;
}

.cfb-file-label {
    display: block;
    padding: 25px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    position: relative;
    overflow: hidden;
}

.cfb-file-label:hover {
    border-color: #007cba;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
}

.cfb-file-label:focus,
.cfb-file:focus + .cfb-file-label {
    border-color: #007cba;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

.cfb-file-icon {
    font-size: 28px;
    margin-bottom: 12px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.cfb-file-label:hover .cfb-file-icon {
    transform: scale(1.1);
    opacity: 1;
}

.cfb-file-text {
    color: #666;
    line-height: 1.5;
}

.cfb-file-text strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

/* File drag and drop styling */
.cfb-field-wrapper.cfb-drag-over .cfb-file-label {
    border-color: #007cba !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    transform: scale(1.03) !important;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.25) !important;
}

/* File confirmation styling */
.cfb-file-info {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border: 1px solid #4caf50;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    font-size: 14px;
    animation: cfb-slideDown 0.3s ease;
}

.cfb-file-info .cfb-file-name {
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 4px;
}

.cfb-file-info .cfb-file-size {
    font-size: 12px;
    color: #666;
}

/* OCR Progress Styling */
.cfb-ocr-progress {
    margin: 15px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 2px solid #007cba;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
    animation: cfb-slideDown 0.4s ease;
}

.cfb-ocr-status {
    font-weight: 600;
    color: #007cba;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfb-ocr-progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin: 12px 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.cfb-ocr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba 0%, #0096d4 50%, #00b4d8 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cfb-ocr-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.6),
        transparent
    );
    animation: cfb-shimmer 1.5s infinite;
}

.cfb-ocr-tip {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

/* OCR Results Styling */
.cfb-ocr-results {
    margin: 15px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.cfb-ocr-amounts {
    padding: 12px 16px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    border-left: 4px solid #007cba;
    margin: 12px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.cfb-ocr-suggested {
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 8px;
    border: 2px solid #4caf50;
    margin: 15px 0;
    text-align: center;
}

.cfb-ocr-suggested-amount {
    font-size: 24px;
    font-weight: 700;
    color: #2e7d32;
    margin: 8px 0;
}

/* OCR Action Buttons */
.cfb-use-ocr-amount {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-right: 10px !important;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3) !important;
}

.cfb-use-ocr-amount:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4) !important;
}

.cfb-dismiss-ocr {
    background: #f5f5f5 !important;
    color: #666 !important;
    border: 1px solid #ddd !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.cfb-dismiss-ocr:hover {
    background: #e9ecef !important;
    transform: translateY(-1px) !important;
}

/* Radio and Checkbox Groups */
.cfb-radio-group,
.cfb-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cfb-radio-label,
.cfb-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cfb-radio-label:hover,
.cfb-checkbox-label:hover {
    background: #f8f9fa;
    color: #007cba;
}

.cfb-radio,
.cfb-checkbox {
    margin-right: 12px;
    width: auto;
    cursor: pointer;
    transform: scale(1.1);
}

/* Hidden Fields */
.cfb-hidden {
    display: none;
}

/* Submit Button */
.cfb-form-submit {
    margin-top: 25px;
    text-align: left;
}

.cfb-submit-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.cfb-submit-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.cfb-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.cfb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Submit Button Loading State */
.cfb-submit-btn .cfb-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: cfb-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Messages */
.cfb-form-messages {
    margin-top: 20px;
}

.cfb-success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 16px 20px;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: cfb-slideDown 0.5s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.cfb-success-message::before {
    content: '✓';
    font-weight: bold;
    margin-right: 8px;
    font-size: 16px;
}

.cfb-error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    padding: 16px 20px;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: cfb-slideDown 0.5s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.cfb-error-message::before {
    content: '⚠';
    font-weight: bold;
    margin-right: 8px;
    font-size: 16px;
}

/* Field Errors */
.cfb-field-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    border-left: 3px solid #dc3545;
    border-radius: 6px;
    display: none;
    animation: cfb-slideDown 0.3s ease;
}

.cfb-field-has-error .cfb-input,
.cfb-field-has-error .cfb-textarea,
.cfb-field-has-error .cfb-select,
.cfb-field-has-error .cfb-file-label {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.cfb-field-has-error .cfb-field-label {
    color: #dc3545;
}

/* Animations */
@keyframes cfb-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes cfb-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes cfb-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Field Width Classes */
.cfb-half-width {
    display: inline-block;
    width: calc(50% - 10px);
    margin-right: 20px;
}

.cfb-half-width:nth-child(even),
.cfb-half-width:last-child {
    margin-right: 0;
}

.cfb-third-width {
    display: inline-block;
    width: calc(33.33% - 14px);
    margin-right: 20px;
}

.cfb-third-width:nth-child(3n),
.cfb-third-width:last-child {
    margin-right: 0;
}

/* reCAPTCHA Notice */
.cfb-recaptcha-notice {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    line-height: 1.5;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.cfb-recaptcha-notice a {
    color: #007cba;
    text-decoration: none;
}

.cfb-recaptcha-notice a:hover {
    text-decoration: underline;
}

/* Auto-fill indicator */
.cfb-input.cfb-auto-filled,
.cfb-textarea.cfb-auto-filled {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-color: #b3d9ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cfb-form-container {
        padding: 0 15px;
    }
    
    .cfb-input,
    .cfb-textarea,
    .cfb-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .cfb-submit-btn {
        width: 100%;
        padding: 16px;
    }
    
    .cfb-radio-group,
    .cfb-checkbox-group {
        gap: 15px;
    }
    
    .cfb-file-label {
        padding: 20px 15px;
    }
    
    .cfb-half-width,
    .cfb-third-width {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .cfb-ocr-progress {
        padding: 15px;
    }
    
    .cfb-ocr-suggested-amount {
        font-size: 20px;
    }
    
    .cfb-use-ocr-amount,
    .cfb-dismiss-ocr {
        display: block !important;
        width: 100% !important;
        margin-bottom: 10px !important;
        margin-right: 0 !important;
    }
}

/* Accessibility */
.cfb-input:focus,
.cfb-textarea:focus,
.cfb-select:focus,
.cfb-file:focus + .cfb-file-label,
.cfb-radio:focus,
.cfb-checkbox:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cfb-input,
    .cfb-textarea,
    .cfb-select,
    .cfb-file-label {
        border-width: 2px;
    }
    
    .cfb-submit-btn {
        border: 2px solid #007cba;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cfb-form {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .cfb-field-label {
        color: #ffffff;
    }
    
    .cfb-input,
    .cfb-textarea,
    .cfb-select {
        background-color: #2d2d2d;
        border-color: #444;
        color: #ffffff;
    }
    
    .cfb-file-label {
        background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
        border-color: #444;
        color: #ffffff;
    }
    
    .cfb-file-label:hover {
        background: linear-gradient(135deg, #3a3a3a 0%, #444 100%);
        border-color: #4a9eff;
    }
    
    .cfb-input:focus,
    .cfb-textarea:focus,
    .cfb-select:focus,
    .cfb-file:focus + .cfb-file-label {
        border-color: #4a9eff;
        box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
    }
}

/* Form animation */
.cfb-form-container {
    animation: cfb-fadeIn 0.6s ease-in-out;
}

/* Loading overlay for forms */
.cfb-form-container.cfb-loading-overlay {
    position: relative;
}

.cfb-form-container.cfb-loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

/* Premium form styling */
.cfb-form.cfb-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cfb-form.cfb-premium .cfb-field-label {
    color: #ffffff;
    font-weight: 600;
}

.cfb-form.cfb-premium .cfb-input,
.cfb-form.cfb-premium .cfb-textarea,
.cfb-form.cfb-premium .cfb-select {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cfb-form.cfb-premium .cfb-submit-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 25px;
    padding: 18px 40px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(255, 107, 107, 0.4);
}

.cfb-form.cfb-premium .cfb-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(255, 107, 107, 0.5);
}
/**
 * Enhanced CSS for Cashback Calculation Display
 * Add this to your frontend.css file
 */

/* Calculation Display Container */
.cfb-calculation-display {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #007cba;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
    animation: cfb-slideDown 0.4s ease;
}

.cfb-calculation-display h4 {
    margin: 0 0 15px 0;
    color: #007cba;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
}

/* Calculation Rows */
.cfb-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 124, 186, 0.1);
    font-size: 14px;
}

.cfb-calc-row:last-child {
    border-bottom: none;
}

.cfb-calc-total {
    background: rgba(0, 124, 186, 0.1);
    margin: 10px -20px -20px;
    padding: 15px 20px;
    border-radius: 0 0 10px 10px;
    font-size: 16px;
    color: #007cba;
}

/* Calculation Notes */
.cfb-calc-note {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.cfb-calc-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
}

.cfb-calc-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
}

/* Amount Validation */
.cfb-amount-validation {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    animation: cfb-slideDown 0.3s ease;
}

.cfb-validation-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
}

.cfb-validation-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
}

/* Field Styling for Calculation Forms */
.cfb-readonly input {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    color: #007cba !important;
    font-weight: 600 !important;
    cursor: not-allowed !important;
    border: 2px solid #007cba !important;
}

.cfb-amount-warning {
    border-color: #ffc107 !important;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%) !important;
}

.cfb-amount-error {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, #fff5f5 0%, #fee !important;
}

/* Enhanced OCR Integration for Calculations */
.cfb-ocr-calculation-suggestion {
    margin: 15px 0;
    padding: 18px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    animation: cfb-slideDown 0.4s ease;
}

.cfb-ocr-calculation-suggestion h5 {
    margin: 0 0 12px 0;
    color: #1976d2;
    font-weight: 700;
}

.cfb-suggested-calculation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #2196f3;
}

.cfb-suggested-amount {
    font-size: 20px;
    font-weight: 700;
    color: #1976d2;
}

.cfb-calculation-actions {
    margin-top: 15px;
    text-align: center;
}

.cfb-use-calculation {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-right: 10px !important;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3) !important;
}

.cfb-use-calculation:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4) !important;
}

/* Category-specific styling */
.cfb-cashback-estimation {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
}

.cfb-cashback-estimation h4 {
    color: #28a745;
    border-bottom-color: #28a745;
}

.cfb-cashback-estimation .cfb-calc-total {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.cfb-reimbursement-estimation {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
}

.cfb-reimbursement-estimation h4 {
    color: #007bff;
    border-bottom-color: #007bff;
}

.cfb-reimbursement-estimation .cfb-calc-total {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* Form section dividers for complex forms */
.cfb-form-section {
    margin: 30px 0;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.cfb-form-section h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 20px;
    font-weight: 600;
}

/* Benefit tracking display */
.cfb-benefit-tracker {
    margin: 20px 0;
    padding: 18px;
    background: linear-gradient(135deg, #fff9c4 0%, #fcf4a3 100%);
    border: 2px solid #f39c12;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.cfb-benefit-tracker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f39c12, #f1c40f);
}

.cfb-benefit-tracker h4 {
    margin: 0 0 15px 0;
    color: #d68910;
    font-size: 16px;
    font-weight: 700;
}

.cfb-benefit-bar {
    background: rgba(255, 255, 255, 0.7);
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

.cfb-benefit-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #e67e22, #f39c12);
    transition: width 0.8s ease;
    border-radius: 12px;
}

.cfb-benefit-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: #8b4513;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}

/* Responsive design for calculations */
@media (max-width: 768px) {
    .cfb-calculation-display {
        padding: 15px;
        margin: 15px 0;
    }
    
    .cfb-calc-row {
        font-size: 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .cfb-calc-total {
        margin: 10px -15px -15px;
        padding: 12px 15px;
    }
    
    .cfb-suggested-calculation {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cfb-calculation-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .cfb-use-calculation,
    .cfb-dismiss-ocr {
        width: 100% !important;
        margin-right: 0 !important;
    }
}

/* Animation enhancements */
@keyframes cfb-benefit-fill {
    from { width: 0%; }
    to { width: var(--fill-width); }
}

.cfb-benefit-bar-fill[data-animate="true"] {
    animation: cfb-benefit-fill 1.2s ease-out;
}

/* Print styles */
@media print {
    .cfb-calculation-display,
    .cfb-benefit-tracker {
        border: 1px solid #000 !important;
        background: white !important;
    }
    
    .cfb-amount-validation,
    .cfb-calc-note {
        border: 1px solid #666 !important;
        background: #f5f5f5 !important;
    }
}
