/**
 * NEXUS EXIF INTELLIGENCE - SEMANTIC PROTOCOL (v40.30.1)
 * High-Fidelity styling for camera metadata and reliability shields.
 */

/* --- NEXUS EXIF SEMANTIC TOKENS (v40.76) --- */
:root {
    --exif-accent: var(--accent-gold);
    --exif-danger: var(--accent-error);
    --exif-success: var(--accent-success);
    --exif-warning: var(--accent-warning);
    --exif-info: var(--accent-info);
    --exif-text-main: var(--text-primary);
    --exif-text-muted: var(--text-secondary);
    --exif-bg-card: rgba(255, 255, 255, 0.03);
    --exif-border-card: rgba(255, 255, 255, 0.05);
    --exif-cert-success: #4040ff;
    --exif-cert-info: #42a146;
    --exif-cert-unsuccess: #6d6d6d;
    --exif-cert-text-success: #ffffff;
    --exif-cert-text-info: #fdfdfd;
    --exif-cert-text-unsuccess: #ffffff;
}

[data-theme="light"] :root {
    --exif-bg-card: rgba(0, 0, 0, 0.03);
    --exif-border-card: rgba(0, 0, 0, 0.08);
}

/* SEMANTIC CONTAINER */
.nx-exif-hub {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem;
    text-align: left;
}

/* DESCRIPTION LIST (SEMANTIC METADATA) */
.nx-exif-hub dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem 1.25rem;
    background: var(--exif-bg-card);
    border: 1px solid var(--exif-border-card);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 0;
}

.nx-exif-hub dt {
    color: var(--exif-accent);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nx-exif-hub dd {
    margin: 0;
    color: var(--exif-text-main);
    font-size: 0.95rem;
    font-weight: 500;
}

/* SETTINGS MATRIX (SEMANTIC GRID) */
.nx-exif-settings-matrix {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.nx-exif-settings-matrix span {
    background: rgba(212, 175, 55, 0.1);
    color: var(--exif-accent);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* RELIABILITY SHIELD (SEMANTIC ASSET) */
.nx-reliability-shield {
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
    border-width: 1px;
    border-style: solid;
}

.nx-reliability-shield.is-certified {
    background: rgba(46, 204, 113, 0.1);
    color: var(--exif-success);
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.1);
}

.nx-reliability-shield.is-elite {
    background: rgba(64, 64, 255, 0.1);
    color: #4040ff;
    border-color: rgba(64, 64, 255, 0.3);
    box-shadow: 0 4px 20px rgba(64, 64, 255, 0.1);
}

.nx-reliability-shield.is-institutional {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
}

.nx-reliability-shield.is-unverified {
    background: rgba(255, 193, 7, 0.1);
    color: #f1c40f;
    border-color: rgba(241, 196, 15, 0.2);
}

.nx-reliability-shield.is-violation {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
    animation: nx-violation-pulse 2s infinite;
}

@keyframes nx-violation-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* UI ELEMENTS */
.nx-media-item .nx-btn-media-info {
    background: rgba(212, 175, 55, 0.9);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nx-media-item .nx-btn-media-info:hover {
    background: var(--exif-accent);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* --- FORENSIC AUDIT SYNC (v40.78) --- */
.nx-forensic-audit-block {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-accent);
    border: 1px dashed hsla(var(--h-accent), var(--s-accent), var(--l-accent), 0.3);
    border-radius: 12px;
    animation: nx-forensic-entrance 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-forensic-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--exif-accent);
}

.nx-forensic-header strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
    color: var(--exif-text-main);
}

.nx-forensic-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--nx-support-warning-bg);
    gap: 12px;
}

.nx-forensic-item-content {
    flex: 1;
}

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

.nx-forensic-item dt {
    font-size: 0.7rem !important;
    opacity: 0.7;
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
}

.nx-forensic-item dd {
    font-size: 0.8rem !important;
    color: var(--exif-accent) !important;
    font-weight: 600;
    text-align: right;
    font-family: monospace;
}


/* --- NEXUS CERTIFIED BADGE (v51.5.6-PROD) --- */
.nx-certified-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    width: 38px;
    height: 38px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 21 !important;
    pointer-events: auto !important;
}

.nx-certified-badge:hover svg {
    transform: scale(1.15) rotate(5deg);
    stroke: rgba(255, 255, 255, 0.4) !important;
    filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.75));
}

/* HIGH-FIDELITY ICON PROTOCOL (v51.5.9) */
.nx-certified-badge i,
.nx-certified-badge svg {
    width: 34px !important;
    height: 34px !important;
    stroke-width: 1.5px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CHROMATIC SIGNATURES (ICON-CENTRIC) - HARDENED NPSP v75.4 */
.nx-certified-badge.is-blue svg {
    stroke: #ffffff !important;
    fill: #4040ff !important;
    filter: drop-shadow(0 4px 15px rgba(64, 64, 255, 0.75));
}

.nx-certified-badge.is-green svg {
    stroke: #ffffff !important;
    fill: #42a146 !important;
    filter: drop-shadow(0 4px 15px rgba(66, 161, 70, 0.75));
}

.nx-certified-badge.is-gold svg {
    stroke: #ffffff !important;
    fill: #d4af37 !important;
    filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.75));
}

.nx-certified-badge.is-grey svg,
.nx-certified-badge.is-white svg {
    stroke: rgb(143 143 143 / 80%) !important;
    fill: #ffffff !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* RED: Forensic Violation (White Stroke + Red Fill) */
.nx-certified-badge.is-red svg {
    stroke: #ffffff !important;
    fill: #ef4444 !important;
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.9));
}

/* PURPLE: Video Reality (White Stroke + Purple Fill) */
.nx-certified-badge.is-video svg {
    stroke: #ffffff !important;
    fill: #8b5cf6 !important;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.9));
}

/* SPARKLE: AI / Synthetic (White Stroke + Cyan Fill) */
.nx-certified-badge.is-sparkle svg {
    stroke: #ffffff !important;
    fill: #06b6d4 !important;
    filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.9));
}

.nx-certified-badge.is-red svg path,
.nx-certified-badge.is-red svg polygon,
.nx-certified-badge.is-red svg circle,
.nx-certified-badge.is-blue svg path,
.nx-certified-badge.is-green svg path,
.nx-certified-badge.is-gold svg path {
    fill: inherit !important;
    stroke: inherit !important;
}


/* BORDER GLOW & DEPTH PURGED - AURA SINC v51.6.3 */

/* --- FORENSIC VIOLATION REPORT (MODAL) --- */
.nx-forensic-violation-report {
    margin-top: 1.5rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
}

.nx-violation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ef4444;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.nx-violation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nx-violation-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(239, 68, 68, 0.2);
}

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

.v-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #ef4444;
    text-transform: uppercase;
}

.v-content {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.nx-violation-footer {
    margin-top: 1rem;
    font-size: 0.7rem;
    opacity: 0.7;
    font-style: italic;
    color: #ef4444;
}

/* PULSE ANIMATION */
.nx-badge-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: nx-badge-ping 2s infinite;
}

@keyframes nx-badge-ping {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    70% {
        transform: scale(1.4);
        opacity: 0;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* --- ELITE FORENSIC GRID (v40.91) --- */
.nx-exif-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.nx-exif-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nx-exif-item label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.nx-exif-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* SOVEREIGNTY BLOCK */
.nx-forensic-sovereignty {
    margin-top: 1.5rem;
    background: rgba(212, 175, 55, 0.03);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.nx-forensic-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.nx-forensic-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1.5rem;
}

.nx-forensic-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 14px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    gap: 14px;
    border-bottom: 1px dashed var(--accent-gold);
}

.nx-forensic-row:last-child {}

.nx-forensic-row .label {
    flex: 1;
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nx-forensic-row .val {
    flex: 3;
    font-weight: 300;
    color: var(--text-primary);
    text-align: start;
}

.nx-forensic-row .val.gold {
    color: var(--accent-gold);
    font-weight: 600;
}

.nx-forensic-row .val.mono {
    font-family: monospace;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
    opacity: 0.9;
}

.nx-forensic-gps-link {
    display: inline-flex;
    gap: 5px;
    color: #4040ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    font-family: monospace;
    transition: all 0.2s ease;
    align-items: center;
    margin: unset;
    padding: unset;
}

.nx-forensic-gps-link:hover {
    color: rgba(64, 64, 255, 0.8);
    text-decoration: underline;
}

/* NEXUS GEOGRAPHIC PROTOCOL v51.3 */
.nx-exif-location {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(64, 64, 255, 0.05);
    border: 1px solid rgba(64, 64, 255, 0.15);
    border-radius: 10px;
    text-decoration: none;
    color: #4040ff;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nx-exif-location:hover {
    background: rgba(64, 64, 255, 0.1);
    border-color: rgba(64, 64, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(64, 64, 255, 0.15);
}

/* --- NEXUS IDENTITY INTELLIGENCE PROTOCOL (v52.3.9-FINAL) --- */
.nx-identity-modal-container {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.nx-identity-modal-container.is-active {
    display: flex;
}

.nx-identity-modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--modal-overlay-bg);
    backdrop-filter: var(--modal-overlay-blur);
}

.nx-identity-modal-content {
    position: relative;
    max-width: var(--modal-max-width-lg, 750px);
    width: 95%;
    background: var(--modal-bg);
    border-radius: var(--modal-border-radius);
    box-shadow: var(--modal-shadow);
    overflow: hidden;
    border: 1px solid var(--modal-border);
}

.nx-identity-modal-header {
    padding: var(--gap-md) var(--gap-lg);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--modal-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nx-identity-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 850;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    color: var(--text-primary);
}

.nx-identity-modal-header .nx-app-modal-close {
    background: var(--bg-hover-primary);
    border-radius: var(--radius-sm);
    padding: var(--gap-xs);
    transition: var(--transition-base);
}

.nx-identity-modal-header .nx-app-modal-close:hover {
    background: var(--bg-hover);
    color: var(--accent-gold);
}

.nx-identity-report-body {
    padding: var(--gap-lg);
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg-primary);
}

.nx-identity-avatar-hero {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.nx-identity-avatar-circle {
    width: 80px;
    height: 80px;
    background: var(--accent-gold);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-on-accent);
    font-weight: 950;
    box-shadow: var(--glow-accent);
}

.nx-identity-hero-info h2 {
    margin: 0;
    font-size: 1.85rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.nx-identity-hero-info p {
    margin: 0.2rem 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--text-dim);
}

.nx-identity-badge-cluster {
    display: flex;
    gap: var(--gap-xs);
}

.nx-identity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

.nx-identity-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-border-radius-sm, 1.25rem);
    padding: var(--gap-md);
    transition: var(--transition-premium);
    backdrop-filter: blur(15px);
}

.nx-identity-stat-card:hover {
    border-color: var(--border-active);
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
}

.nx-identity-stat-card h4 {
    margin: 0 0 var(--gap-md) 0;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.nx-identity-data-point {
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs);
    margin-bottom: var(--gap-md);
}

.nx-identity-data-point:last-child {
    margin-bottom: 0;
}

.nx-identity-label {
    font-size: 0.65rem;
    font-weight: 850;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nx-identity-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nx-identity-value.is-mono {
    font-family: var(--font-mono, monospace);
    color: var(--accent-gold);
    letter-spacing: 0.02em;
}

.nx-identity-value.is-dim {
    font-weight: 300;
    opacity: 0.75;
    word-break: break-all;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.nx-identity-fingerprint-box {
    margin-top: var(--gap-md);
    padding: var(--gap-md);
    background: var(--bg-deep);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.nx-identity-fingerprint-text {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-dim);
    margin: 0;
    word-break: break-all;
}

.nx-identity-action-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--gap-sm);
    margin-top: var(--gap-lg);
}

.nx-identity-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xs);
    padding: var(--gap-sm) var(--gap-md);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition-premium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nx-identity-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
    filter: brightness(1.2);
}

.nx-identity-modal-footer {
    padding: var(--gap-md) var(--gap-lg);
    border-top: 1px solid var(--border-subtle);
    background: var(--modal-footer-bg);
    display: flex;
    justify-content: flex-end;
    gap: var(--gap-md);
}

.nx-identity-footer-btn {
    min-width: 160px;
    padding: var(--gap-sm) var(--gap-lg);
    border-radius: var(--radius-lg);
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}