/* ==========================================================================
   NODE COMPARISON PAGE STYLES
   ========================================================================== */

/* Explorer Controls */
.explorer-controls {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

/* Hero Controls - Make search boxes prominent */
.controls-row-unified.controls-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border);
    flex-wrap: wrap;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Unified Controls Row - All primary controls on one line */
.controls-row-unified {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.controls-row-unified .search-container {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

/* Search divider for node comparison */
.search-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 0 0.5rem;
    flex-shrink: 0;
}

.search-divider i {
    opacity: 0.6;
}

/* Controls helper text */
.controls-helper {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    padding: 0 1rem;
}

/* Example Chips */
.example-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.example-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

.example-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.25);
}

.example-chip:active {
    transform: translateY(0);
}

.example-chip i {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Loading and Error States */
.loading-state, .error-state, .welcome-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.loading-content, .error-content, .welcome-content-minimal {
    max-width: 600px;
}

.loading-content i, .error-content i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.loading-content p, .error-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Minimal Welcome Message */
.welcome-content-minimal {
    width: 100%;
}

.welcome-instruction {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
    font-weight: 400;
}

/* Try Example Links - Subtle styling */
.try-example-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px dashed var(--primary);
}

.try-example-link:hover {
    color: var(--primary-dark, #e68900);
    border-bottom-style: solid;
}

.try-example-link-small {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px dashed var(--primary);
}

.try-example-link-small:hover {
    color: var(--primary-dark, #e68900);
    border-bottom-style: solid;
}

.helper-divider {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

/* Explorer Controls - Add margin when following welcome state */
.welcome-state + .explorer-controls {
    margin-top: 1.5rem;
}

/* Comparison Content */
.comparison-content {
    display: none;
}

/* Nodes Grid */
.nodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* Node Card */
.node-card {
    background: var(--bg-primary);
    border: 1px solid var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.node-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-secondary);
}

.node-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.node-pubkey {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.node-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-secondary);
}

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

.label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.value {
    color: var(--text-primary);
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.connect-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.connect-address span {
    font-family: monospace;
    font-size: 0.8rem;
}

/* Chart Section */
.chart-section {
    background: var(--bg-primary);
    border: 1px solid var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.chart-section h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

#radarChart {
    width: 100%;
    height: 800px;
}

/* ==========================================================================
   RESPONSIVE DESIGN FOR COMPARISON
   ========================================================================== */

@media (max-width: 768px) {
    .controls-row-unified {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }

    .controls-row-unified .search-container {
        max-width: 100%;
        min-width: 100%;
    }
    
    .search-divider {
        display: none; /* Hide plus on mobile */
    }
    
    .nodes-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }

    .chart-section {
        padding: 1rem;
    }

    #radarChart {
        height: 600px;
    }
}

/* Distribution Charts Grid */
.distribution-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.distribution-chart-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.distribution-chart-item h3 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}