/* ============================================
   INSURANCE CLAIMS VERIFICATION
   Results Screen & Common Styles
   ============================================ */

.ins-results-container {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a0f 0%, #0d0d14 100%);
    padding: 40px 20px;
}

.ins-results-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.ins-results-header {
    text-align: center;
    margin-bottom: 40px;
}

.ins-results-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.ins-results-claim-ref {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* Score Card */
.ins-score-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.ins-score-circle {
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
    position: relative;
}

.ins-score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ins-score-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.ins-score-circle-progress {
    fill: none;
    stroke: url(#insScoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339;
    stroke-dashoffset: 339;
    transition: stroke-dashoffset 1s ease-out;
}

.ins-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
}

.ins-score-value span {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.ins-score-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

/* Score Stats */
.ins-score-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.ins-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ins-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ins-stat-icon svg {
    width: 18px;
    height: 18px;
}

.ins-stat-icon.verified { background: rgba(16, 185, 129, 0.15); }
.ins-stat-icon.verified svg { stroke: #10b981; }
.ins-stat-icon.discrepancy { background: rgba(245, 158, 11, 0.15); }
.ins-stat-icon.discrepancy svg { stroke: #f59e0b; }
.ins-stat-icon.unverifiable { background: rgba(107, 114, 128, 0.15); }
.ins-stat-icon.unverifiable svg { stroke: #6b7280; }

.ins-stat-text { font-size: 14px; }
.ins-stat-count { font-weight: 600; color: #ffffff; }
.ins-stat-label { color: rgba(255, 255, 255, 0.6); margin-left: 4px; }

/* Results Sections */
.ins-results-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
}

.ins-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ins-section-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ins-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ins-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ins-section-icon svg { width: 20px; height: 20px; }
.ins-section-icon.discrepancy { background: rgba(245, 158, 11, 0.15); }
.ins-section-icon.discrepancy svg { stroke: #f59e0b; }
.ins-section-icon.verified { background: rgba(16, 185, 129, 0.15); }
.ins-section-icon.verified svg { stroke: #10b981; }
.ins-section-icon.unverifiable { background: rgba(107, 114, 128, 0.15); }
.ins-section-icon.unverifiable svg { stroke: #6b7280; }

.ins-section-name { font-size: 16px; font-weight: 600; color: #ffffff; }
.ins-section-count { font-size: 13px; color: rgba(255, 255, 255, 0.5); }

.ins-section-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.ins-section-toggle svg { width: 20px; height: 20px; stroke: rgba(255, 255, 255, 0.5); }
.ins-results-section.expanded .ins-section-toggle { transform: rotate(180deg); }

.ins-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ins-results-section.expanded .ins-section-content { max-height: 2000px; }

/* Result Items */
.ins-result-item {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ins-result-item:first-child { border-top: none; }

.ins-result-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ins-result-info { flex: 1; }

.ins-result-label {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
}

.ins-result-values {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.ins-result-claimed { color: rgba(255, 255, 255, 0.7); }
.ins-result-arrow { color: rgba(255, 255, 255, 0.3); }
.ins-result-arrow svg { width: 16px; height: 16px; vertical-align: middle; }
.ins-result-found { color: #10b981; }
.ins-result-found svg { width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; }
.ins-result-found.mismatch { color: #f59e0b; }

.ins-result-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ins-result-badge.minor { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.ins-result-badge.moderate { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.ins-result-badge.major { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.ins-result-badge.critical { background: rgba(220, 38, 38, 0.2); color: #dc2626; }

.ins-result-explanation {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding-left: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.ins-result-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ins-action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ins-action-btn.accept { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.ins-action-btn.accept:hover { background: rgba(16, 185, 129, 0.25); }
.ins-action-btn.flag { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.ins-action-btn.flag:hover { background: rgba(239, 68, 68, 0.25); }
.ins-action-btn.note { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); }
.ins-action-btn.note:hover { background: rgba(255, 255, 255, 0.12); }

/* Download Buttons */
.ins-download-section {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.ins-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ins-download-btn svg { width: 18px; height: 18px; }

.ins-download-btn.primary {
    background: linear-gradient(135deg, #4384ff 0%, #7b42ff 100%);
    color: white;
}

.ins-download-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 132, 255, 0.3);
}

.ins-download-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ins-download-btn.secondary:hover { background: rgba(255, 255, 255, 0.12); }

/* Back Button */
.ins-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.ins-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.ins-back-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .ins-results-title { font-size: 24px; }
    .ins-score-stats { gap: 24px; }
    .ins-result-main { flex-direction: column; }
    .ins-download-section { flex-direction: column; }
    .ins-download-btn { width: 100%; justify-content: center; }
}

/* ============================================
   VIEW TOGGLE
   ============================================ */

.ins-view-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 12px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.ins-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}

.ins-view-btn svg {
    width: 18px;
    height: 18px;
}

.ins-view-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.ins-view-btn.active {
    background: rgba(67, 132, 255, 0.15);
    color: #4384ff;
}

.ins-results-view,
.ins-form-view {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .ins-view-toggle {
        max-width: 100%;
    }

    .ins-view-btn span {
        display: none;
    }
}

/* ============================================
   LIGHT THEME SUPPORT
   ============================================ */

/* Container */
[data-theme="light"] .ins-results-container {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Header */
[data-theme="light"] .ins-results-title {
    color: #0f172a;
}

[data-theme="light"] .ins-results-claim-ref {
    color: #64748b;
}

/* Score Card */
[data-theme="light"] .ins-score-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .ins-score-circle-bg {
    stroke: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .ins-score-value {
    color: #0f172a;
}

[data-theme="light"] .ins-score-value span {
    color: #64748b;
}

[data-theme="light"] .ins-score-label {
    color: #475569;
}

/* Score Stats */
[data-theme="light"] .ins-stat-count {
    color: #0f172a;
}

[data-theme="light"] .ins-stat-label {
    color: #64748b;
}

/* Results Sections */
[data-theme="light"] .ins-results-section {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .ins-section-header:hover {
    background: rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .ins-section-name {
    color: #0f172a;
}

[data-theme="light"] .ins-section-count {
    color: #64748b;
}

[data-theme="light"] .ins-section-toggle svg {
    stroke: #64748b;
}

/* Result Items */
[data-theme="light"] .ins-result-item {
    border-top-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .ins-result-label {
    color: #0f172a;
}

[data-theme="light"] .ins-result-claimed {
    color: #475569;
}

[data-theme="light"] .ins-result-arrow {
    color: #94a3b8;
}

[data-theme="light"] .ins-result-explanation {
    color: #64748b;
    border-left-color: rgba(15, 23, 42, 0.15);
}

/* Action Buttons - Light Theme */
[data-theme="light"] .ins-action-btn.note {
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
}

[data-theme="light"] .ins-action-btn.note:hover {
    background: rgba(15, 23, 42, 0.1);
}

/* Download Buttons - Light Theme */
[data-theme="light"] .ins-download-btn.secondary {
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .ins-download-btn.secondary:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

/* Back Button - Light Theme */
[data-theme="light"] .ins-back-btn {
    background: transparent;
    border-color: rgba(15, 23, 42, 0.15);
    color: #475569;
}

[data-theme="light"] .ins-back-btn:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.25);
    color: #1e293b;
}

/* View Toggle - Light Theme */
[data-theme="light"] .ins-view-toggle {
    background: rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .ins-view-btn {
    color: #64748b;
}

[data-theme="light"] .ins-view-btn:hover {
    color: #475569;
}

[data-theme="light"] .ins-view-btn.active {
    background: #fff;
    color: #4384ff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
