/* ===================================
   Item Breakdown Screen Styles
   =================================== */

/* Item Category Styles */
.item-category {
    margin-bottom: 20px;
    animation: fadeInUp 0.4s ease-out;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary, #EDF2F7);
    border-radius: var(--radius-lg, 8px) var(--radius-lg, 8px) 0 0;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
}

.category-items {
    background: var(--bg-primary, white);
    border-radius: 0 0 var(--radius-lg, 8px) var(--radius-lg, 8px);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
}

/* Item Row Styles */
.item-row {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    background: white;
}

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

.item-row:hover {
    background: #f8f9fa;
}

.item-row.selected {
    background: #f0f9ff;
    border-left: 4px solid var(--primary-blue, #0066CC);
}

.item-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-blue, #0066CC);
}

.item-row input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Item Details */
.item-row h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
}

/* Badge Styles */
.damage-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.damage-badge.damaged {
    background: #fee;
    color: #dc3545;
}

.damage-badge.minor {
    background: #fff3cd;
    color: #856404;
}

.damage-badge.undamaged {
    background: #d4edda;
    color: #155724;
}

.confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.confidence-badge.high {
    background: #d4edda;
    color: #155724;
}

.confidence-badge.medium {
    background: #d1ecf1;
    color: #0c5460;
}

.confidence-badge.low {
    background: #fff3cd;
    color: #856404;
}

/* Claim Summary Card */
.claim-summary-card {
    position: sticky;
    bottom: 0;
    background: var(--bg-primary, white);
    padding: 20px;
    border-radius: var(--radius-lg, 8px);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 20px;
    z-index: 10;
    border-top: 1px solid var(--border-color, #E2E8F0);
}

.claim-summary-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Info Card */
.info-card {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .item-row {
        padding: 12px;
    }
    
    .item-row h5 {
        font-size: 13px;
    }
    
    .category-header {
        padding: 10px 12px;
    }
    
    .claim-summary-card {
        padding: 16px;
    }
}

/* Smooth transitions for total amount */
#total-claim-amount {
    transition: all 0.3s ease;
}

#total-claim-amount.updating {
    animation: scaleUp 0.3s ease;
}

/* Loading state for items */
.item-row.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #6B7280);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===================================
   Claim Breakdown Table (T1)
   =================================== */

.claim-breakdown-card {
    background: var(--bg-primary, #FFFFFF);
    border-radius: var(--radius-lg, 8px);
    border: 1px solid var(--border-color, #E2E8F0);
    padding: 16px;
    margin-bottom: 16px;
}

.claim-breakdown-card h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
}

.claim-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.claim-breakdown-table thead {
    background: var(--bg-tertiary, #F8F9FA);
}

.claim-breakdown-table th {
    text-align: left;
    padding: 10px 8px;
    font-weight: 600;
    color: var(--text-secondary, #718096);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
}

.claim-breakdown-table th:nth-child(2),
.claim-breakdown-table th:nth-child(3) {
    text-align: right;
}

.claim-breakdown-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
    color: var(--text-primary, #2D3748);
}

.claim-breakdown-table td:nth-child(2),
.claim-breakdown-table td:nth-child(3) {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
}

.claim-breakdown-table tbody tr:hover {
    background: var(--bg-secondary, #F8F9FA);
}

.claim-breakdown-table tfoot .total-row {
    background: var(--bg-accent, #E6F4FB);
}

.claim-breakdown-table tfoot .total-row td {
    border-bottom: none;
    font-weight: 600;
}

/* Status badges in table */
.status-full {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--success-green-bg, #F0FFF4);
    color: var(--success-green, #38A169);
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
    font-weight: 500;
}

.status-partial {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--warning-orange-bg, #FFFAF0);
    color: var(--warning-orange, #DD6B20);
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
    font-weight: 500;
}

.status-denied {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--error-red-bg, #FFF5F5);
    color: var(--error-red, #C53030);
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
    font-weight: 500;
}

/* Responsive table */
@media (max-width: 480px) {
    .claim-breakdown-table {
        font-size: 12px;
    }

    .claim-breakdown-table th,
    .claim-breakdown-table td {
        padding: 8px 6px;
    }

    .claim-breakdown-table th:nth-child(4),
    .claim-breakdown-table td:nth-child(4) {
        display: none;
    }
}

/* ===================================
   Supporting Documents Section (T3)
   =================================== */

.supporting-docs-card {
    background: var(--bg-primary, #FFFFFF);
    border-radius: var(--radius-lg, 8px);
    border: 1px solid var(--border-color, #E2E8F0);
    padding: 16px;
    margin-bottom: 16px;
}

.supporting-docs-card h4 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #2D3748);
}

.doc-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
}

.doc-category-row:last-of-type {
    border-bottom: none;
}

.doc-category-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary, #2D3748);
    font-size: 14px;
}

.doc-category-info i {
    color: var(--primary-blue, #0A8AD2);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.doc-category-actions {
    display: flex;
    gap: 8px;
}

.btn-text-small {
    background: none;
    border: none;
    color: var(--text-secondary, #718096);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-text-small:hover {
    color: var(--primary-blue, #0A8AD2);
}

.btn-text-small.primary {
    color: var(--primary-blue, #0A8AD2);
    font-weight: 600;
}

.btn-text-small.primary:hover {
    text-decoration: underline;
}

.doc-hint {
    margin: 12px 0 0 0;
    font-size: 12px;
    color: var(--text-secondary, #718096);
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-hint i {
    font-size: 12px;
}

/* ===================================
   Step Progress Indicator (T6)
   =================================== */

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 0 16px;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-circle.completed {
    background: var(--success-green, #38A169);
    color: white;
}

.step-circle.active {
    background: var(--primary-blue, #0A8AD2);
    color: white;
    box-shadow: 0 0 0 4px rgba(10, 138, 210, 0.2);
}

.step-circle.pending {
    background: var(--bg-tertiary, #E2E8F0);
    color: var(--text-secondary, #718096);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--bg-tertiary, #E2E8F0);
    margin: 0 4px;
}

.step-line.completed {
    background: var(--success-green, #38A169);
}

.step-label {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary, #718096);
    margin-top: 8px;
}

.step-label strong {
    color: var(--primary-blue, #0A8AD2);
}

/* ===================================
   Payment Method Card (T8)
   =================================== */

.payment-method-card {
    background: var(--bg-primary, #FFFFFF);
    border-radius: var(--radius-lg, 8px);
    border: 1px solid var(--border-color, #E2E8F0);
    padding: 16px;
    margin-bottom: 16px;
}

.payment-method-card h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #2D3748);
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--border-color, #E2E8F0);
    border-radius: var(--radius-md, 6px);
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover {
    border-color: var(--primary-blue, #0A8AD2);
    background: var(--bg-accent, #E6F4FB);
}

.payment-option.selected {
    border-color: var(--primary-blue, #0A8AD2);
    background: var(--bg-accent, #E6F4FB);
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option .fa-check-circle {
    margin-left: auto;
    color: var(--primary-blue, #0A8AD2);
    opacity: 0;
    transition: opacity 0.2s;
}

.payment-option.selected .fa-check-circle {
    opacity: 1;
}

.payment-option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-logo {
    font-weight: 700;
    font-size: 15px;
}

.payment-logo.duitnow {
    color: #E31837;
}

.payment-logo.fpx {
    color: #1A237E;
}

.payment-desc {
    font-size: 12px;
    color: var(--text-secondary, #718096);
}
