/* ===== TRUST HEALTH SYSTEM STYLES ===== */

/* Health Bar in Header */
.trust-health {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.health-icon {
    font-size: 14px;
    line-height: 1;
}

.health-bar {
    width: 60px;
    height: 6px;
    background: var(--surface);
    border-radius: 3px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: #32d74b;
    border-radius: 3px;
    transition: width 0.5s ease, background 0.3s ease;
}

.health-text {
    font-weight: 600;
    color: var(--text);
    min-width: 32px;
}

/* Status colors */
.trust-health.status-excellent .health-fill {
    background: #32d74b;
}

.trust-health.status-good .health-fill {
    background: #8cc63f;
}

.trust-health.status-warning .health-fill {
    background: #ff9f0a;
}

.trust-health.status-at-risk .health-fill {
    background: #ff6b35;
}

.trust-health.status-critical .health-fill {
    background: #ff453a;
}

/* Low health warning glow */
.trust-health.status-critical {
    border-color: rgba(255, 69, 58, 0.4);
    box-shadow: 0 0 12px rgba(255, 69, 58, 0.2);
    animation: health-pulse 2s ease-in-out infinite;
}

.trust-health.status-at-risk {
    border-color: rgba(255, 107, 53, 0.3);
}

@keyframes health-pulse {

    0%,
    100% {
        box-shadow: 0 0 12px rgba(255, 69, 58, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 69, 58, 0.4);
    }
}

/* Trust Badge */
.trust-badge {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(50, 215, 75, 0.15), rgba(50, 215, 75, 0.05));
    border: 1px solid rgba(50, 215, 75, 0.3);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: #32d74b;
}

.trust-badge.visible {
    display: flex;
}

.trust-badge svg {
    width: 12px;
    height: 12px;
}

/* Ban Overlay */
.ban-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.ban-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.ban-content {
    text-align: center;
    max-width: 380px;
    padding: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    animation: ban-pop 0.4s ease;
}

@keyframes ban-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.ban-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.ban-content h2 {
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.ban-content>p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.ban-timer {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent);
    font-family: 'SF Mono', 'Consolas', monospace;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.ban-subtitle {
    color: var(--text-tertiary);
    font-size: 13px;
    margin-bottom: 24px;
}

.ban-health {
    display: inline-flex;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.2);
    border-radius: 100px;
    font-size: 13px;
    margin-bottom: 20px;
}

.ban-health span:first-child {
    color: var(--text-secondary);
}

.ban-health .health-value {
    font-weight: 600;
    color: #ff453a;
}

.ban-tip {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 12px;
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 16px;
}

.ban-appeal {
    color: var(--text-tertiary);
    font-size: 12px;
}

.ban-appeal a {
    color: var(--accent);
    text-decoration: none;
}

.ban-appeal a:hover {
    text-decoration: underline;
}

/* Report Modal */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.report-modal.visible {
    opacity: 1;
    visibility: visible;
}

.report-modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 340px;
    animation: modal-pop 0.25s ease;
}

@keyframes modal-pop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.report-modal h3 {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.report-modal>p {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    margin-bottom: 20px;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.report-reason {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-reason:hover {
    background: var(--surface);
    border-color: var(--accent);
}

.report-reason-icon {
    font-size: 20px;
}

.report-reason-text h4 {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.report-reason-text p {
    color: var(--text-tertiary);
    font-size: 12px;
    margin: 0;
}

.report-cancel {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.report-cancel:hover {
    background: var(--surface);
    color: var(--text);
}

/* Body when banned */
body.banned .app-container {
    filter: blur(8px);
    pointer-events: none;
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablet - 768px */
@media (max-width: 768px) {
    .trust-badge {
        display: none !important;
        /* Hide badge on tablet and below */
    }

    .health-bar {
        width: 50px;
    }
}

/* Mobile - 600px */
@media (max-width: 600px) {
    .trust-health {
        padding: 5px 10px;
        gap: 6px;
    }

    .health-bar {
        width: 40px;
    }

    .health-text {
        font-size: 12px;
        min-width: 28px;
    }

    .health-icon {
        font-size: 12px;
    }

    .ban-content {
        padding: 24px 16px;
        margin: 16px;
        max-width: calc(100% - 32px);
    }

    .ban-timer {
        font-size: 36px;
    }

    .ban-icon {
        font-size: 48px;
    }

    .report-modal-content {
        padding: 20px 16px;
    }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    .trust-health {
        padding: 4px 8px;
        gap: 4px;
        border-radius: 8px;
    }

    .health-bar {
        width: 32px;
        height: 5px;
    }

    .health-text {
        font-size: 11px;
        min-width: 24px;
    }

    .health-icon {
        font-size: 11px;
    }

    .ban-content h2 {
        font-size: 20px;
    }

    .ban-timer {
        font-size: 32px;
    }

    .report-reason {
        padding: 12px 14px;
    }

    .report-reason-text h4 {
        font-size: 13px;
    }

    .report-reason-text p {
        font-size: 11px;
    }
}

/* Very Small - 360px (hide progress bar, show only icon + %) */
@media (max-width: 360px) {
    .health-bar {
        display: none;
        /* Hide the progress bar */
    }

    .trust-health {
        padding: 4px 6px;
        gap: 3px;
    }

    .health-text {
        font-size: 10px;
    }

    .ban-content {
        padding: 20px 12px;
    }

    .ban-timer {
        font-size: 28px;
    }

    .ban-tip {
        font-size: 12px;
        padding: 10px;
    }
}

/* ===== TRUST INFO MODAL STYLES ===== */

/* Make health bar clickable */
.trust-health {
    cursor: pointer;
    user-select: none;
}

.trust-health:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.trust-health:active {
    transform: scale(0.98);
}

/* Trust Info Modal */
.trust-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.trust-info-modal.visible {
    opacity: 1;
    visibility: visible;
}

.trust-info-content {
    background: var(--bg-elevated, #1a1a1a);
    border: 1px solid var(--border, #333);
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    max-height: 85vh;
    overflow-y: auto;
    animation: trust-modal-pop 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@keyframes trust-modal-pop {
    0% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Header */
.trust-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border, #333);
    position: sticky;
    top: 0;
    background: var(--bg-elevated, #1a1a1a);
    z-index: 1;
}

.trust-info-icon {
    font-size: 28px;
    line-height: 1;
}

.trust-info-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #fff);
    margin: 0;
}

.trust-info-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface, #2a2a2a);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #888);
    transition: all 0.2s;
}

.trust-info-close:hover {
    background: var(--border, #444);
    color: var(--text, #fff);
}

.trust-info-close svg {
    width: 18px;
    height: 18px;
}

/* Health Display */
.trust-info-health-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(50, 215, 75, 0.1), rgba(50, 215, 75, 0.02));
}

.trust-info-health-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#32d74b 100%, var(--surface, #2a2a2a) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 12px;
}

.trust-info-health-circle::before {
    content: '';
    position: absolute;
    width: 64px;
    height: 64px;
    background: var(--bg-elevated, #1a1a1a);
    border-radius: 50%;
}

.trust-info-health-circle span {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 700;
    color: var(--text, #fff);
}

.trust-info-health-display > p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary, #888);
}

/* Health circle color variants */
.trust-info-health-circle.status-excellent {
    background: conic-gradient(#32d74b var(--health-percent, 100%), var(--surface, #2a2a2a) 0%);
}

.trust-info-health-circle.status-good {
    background: conic-gradient(#8cc63f var(--health-percent, 80%), var(--surface, #2a2a2a) 0%);
}

.trust-info-health-circle.status-warning {
    background: conic-gradient(#ff9f0a var(--health-percent, 60%), var(--surface, #2a2a2a) 0%);
}

.trust-info-health-circle.status-at-risk {
    background: conic-gradient(#ff6b35 var(--health-percent, 40%), var(--surface, #2a2a2a) 0%);
}

.trust-info-health-circle.status-critical {
    background: conic-gradient(#ff453a var(--health-percent, 20%), var(--surface, #2a2a2a) 0%);
}

/* Sections */
.trust-info-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #333);
}

.trust-info-section:last-of-type {
    border-bottom: none;
}

.trust-info-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #fff);
    margin: 0 0 12px 0;
}

/* Lists */
.trust-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trust-info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    line-height: 1.4;
}

.trust-info-list li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--accent, #4a9eff);
}

/* Positive list (health gains) */
.trust-info-list.positive li svg {
    color: #32d74b;
}

.health-gain {
    color: #32d74b;
    font-weight: 600;
}

/* Negative list (health losses) */
.trust-info-list.negative li svg {
    color: #ff453a;
}

.health-loss {
    color: #ff453a;
    font-weight: 600;
}

/* Rules list */
.trust-info-list.rules li {
    padding-left: 20px;
    position: relative;
}

.trust-info-list.rules li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-tertiary, #666);
}

/* Footer */
.trust-info-footer {
    padding: 16px 20px;
    background: var(--surface, #222);
    border-radius: 0 0 24px 24px;
    text-align: center;
}

.trust-info-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary, #888);
}

.trust-info-footer p:first-child {
    font-weight: 600;
    color: var(--text, #fff);
    margin-bottom: 6px;
}

.trust-info-small {
    font-size: 11px !important;
    color: var(--text-tertiary, #666) !important;
}

/* ===== TRUST INFO MODAL RESPONSIVE ===== */

@media (max-width: 480px) {
    .trust-info-content {
        max-height: 90vh;
        border-radius: 20px;
    }

    .trust-info-header {
        padding: 16px;
    }

    .trust-info-icon {
        font-size: 24px;
    }

    .trust-info-header h3 {
        font-size: 16px;
    }

    .trust-info-health-display {
        padding: 20px 16px;
    }

    .trust-info-health-circle {
        width: 70px;
        height: 70px;
    }

    .trust-info-health-circle::before {
        width: 56px;
        height: 56px;
    }

    .trust-info-health-circle span {
        font-size: 18px;
    }

    .trust-info-section {
        padding: 14px 16px;
    }

    .trust-info-section h4 {
        font-size: 13px;
    }

    .trust-info-list li {
        font-size: 12px;
    }

    .trust-info-footer {
        padding: 14px 16px;
    }
}