/* =================================================== */
/* VeraCita - Trust Assessment Dashboard & Badges     */
/* Trust UI Component Styles                          */
/* =================================================== */

/* ============================================= */
/* Trust Dashboard Container                     */
/* ============================================= */

.cs-trust-dashboard {
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.08), rgba(123, 66, 255, 0.08));
    border: 1px solid rgba(67, 132, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Header */
.cs-trust-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cs-trust-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.cs-trust-icon {
    width: 24px;
    height: 24px;
    color: var(--brand-blue);
}

/* Dashboard Content Grid */
.cs-trust-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: center;
}

/* ============================================= */
/* Trust Score Circle                           */
/* ============================================= */

.cs-trust-score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(67, 132, 255, 0.1));
    border: 3px solid rgba(67, 132, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.cs-trust-score-circle:hover {
    transform: scale(1.05);
    border-color: rgba(67, 132, 255, 0.5);
}

.cs-score-value {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #4384ff, #7b42ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.cs-score-label {
    font-size: 13px;
    color: var(--vc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* ============================================= */
/* Trust Breakdown Grid                         */
/* ============================================= */

.cs-trust-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cs-trust-category {
    background: var(--vc-bg-input);
    border: 1px solid var(--vc-border-default);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: default;
}

.cs-trust-category:hover {
    background: var(--vc-bg-input);
    transform: translateY(-2px);
}

/* High Trust Category */
.cs-trust-category.high {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.cs-trust-category.high:hover {
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

/* Medium Trust Category */
.cs-trust-category.medium {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.cs-trust-category.medium:hover {
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

/* Low Trust Category */
.cs-trust-category.low {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.cs-trust-category.low:hover {
    background: rgba(239, 68, 68, 0.08);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

.cs-trust-category .icon {
    font-size: 28px;
    line-height: 1;
}

.cs-trust-category .count {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.cs-trust-category.high .count {
    color: var(--vc-status-supported);
}

.cs-trust-category.medium .count {
    color: var(--vc-status-partial);
}

.cs-trust-category.low .count {
    color: var(--vc-status-unsupported);
}

.cs-trust-category .label {
    font-size: 13px;
    color: var(--vc-text-secondary);
    text-align: center;
    font-weight: 500;
}

/* ============================================= */
/* Trust Alert Banner                           */
/* ============================================= */

.cs-trust-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.cs-trust-alert .alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cs-trust-alert .alert-content {
    flex: 1;
}

.cs-trust-alert .alert-content strong {
    display: block;
    font-size: 15px;
    color: var(--vc-status-unsupported);
    margin-bottom: 4px;
}

.cs-trust-alert .alert-content p {
    font-size: 13px;
    color: var(--vc-text-secondary);
    margin: 0;
}

.cs-trust-alert .btn-upgrade {
    background: linear-gradient(135deg, var(--vc-status-unsupported), #dc2626);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cs-trust-alert .btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* ================================================================ */
/* TRUST BADGE STYLES - Complete Version                           */
/* ================================================================ */

/* Base Badge Container */
.cs-trust-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.2;
    vertical-align: middle;
}

/* Badge Icon */
.cs-trust-badge .icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    font-style: normal;
}

/* Badge Score */
.cs-trust-badge .score {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1;
}

/* High Trust Badge (75-100) */
.cs-trust-badge.high-trust {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--vc-status-supported);
}

/* Medium Trust Badge (50-74) */
.cs-trust-badge.medium-trust {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--vc-status-partial);
}

/* Low Trust Badge (0-49) */
.cs-trust-badge.low-trust {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--vc-status-unsupported);
}

/* Ensure visibility */
.cs-trust-badge,
.cs-trust-badge * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================= */
/* Trust Flags Tooltip                          */
/* ============================================= */

.cs-trust-flags {
    position: absolute;
    top: 50px;
    right: 200px;
    background: rgba(20, 20, 30, 0.98);
    border: 1px solid var(--vc-border-emphasis);
    border-radius: 8px;
    padding: 12px;
    min-width: 250px;
    max-width: 350px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: none; /* Hidden by default */
}

.cs-trust-badge:hover + .cs-trust-flags,
.cs-trust-flags:hover {
    display: block;
}

.cs-trust-flag-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--vc-border-default);
}

.cs-trust-flag-item:last-child {
    border-bottom: none;
}

.cs-trust-flag-item .icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cs-trust-flag-item .message {
    font-size: 13px;
    color: var(--vc-text-secondary);
    line-height: 1.4;
}

.cs-trust-flag-item .recommendation {
    font-size: 12px;
    color: var(--vc-text-muted);
    font-style: italic;
    margin-top: 4px;
}

/* ============================================= */
/* Trust Details Toggle                         */
/* ============================================= */

.cs-trust-details-toggle {
    margin-top: 20px;
    text-align: center;
}

.cs-trust-details-toggle button {
    background: transparent;
    border: 1px solid rgba(67, 132, 255, 0.3);
    color: var(--brand-blue);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cs-trust-details-toggle button:hover {
    background: rgba(67, 132, 255, 0.1);
    border-color: rgba(67, 132, 255, 0.5);
}

.cs-trust-details-toggle .badge {
    background: rgba(67, 132, 255, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* ============================================= */
/* Responsive Adjustments                       */
/* ============================================= */

@media (max-width: 1200px) {
    .cs-trust-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .cs-trust-score-circle {
        width: 140px;
        height: 140px;
        margin: 0 auto;
    }
    
    .cs-score-value {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .cs-trust-breakdown {
        grid-template-columns: 1fr;
    }
    
    .cs-trust-badge {
        position: static;
        margin-top: 12px;
    }
}