/* Map Tool V2 - Data Terminal Aesthetic */

.map-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease-out;
}

/* Search Header */
.terminal-header {
    background: rgba(10, 10, 20, 0.9);
    border: 1px solid var(--primary-dim);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.terminal-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 243, 255, 0.03) 3px,
            rgba(0, 243, 255, 0.03) 4px);
    pointer-events: none;
}

@media (min-width: 768px) {
    .terminal-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.search-module {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary);
    padding: 1rem 1rem 1rem 3rem;
    color: var(--primary);
    font-family: 'Space Grotesk', monospace;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    transition: all 0.3s;
}

.search-input:focus {
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.2);
    background: rgba(0, 0, 0, 0.8);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.7;
}

/* Data Grid */
.terminal-grid-container {
    background: rgba(5, 5, 10, 0.85);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 1px;
    /* border trick */
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.data-grid {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Space Grotesk', monospace;
}

.data-grid thead tr {
    background: rgba(0, 243, 255, 0.1);
}

.data-grid th {
    padding: 1rem;
    text-align: left;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--primary-dim);
    position: relative;
}

.data-grid th .th-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.data-grid th select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 2px;
    max-width: 100%;
    border-radius: 4px;
}

.data-grid th span {
    cursor: pointer;
    transition: color 0.2s;
}

.data-grid th span:hover {
    color: var(--text-main);
    text-shadow: 0 0 8px var(--primary);
}

.data-grid td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.2s;
}

.data-grid tr:hover td {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.data-grid tr:last-child td {
    border-bottom: none;
}

/* Status Indicators */
td:nth-child(5) {
    /* Type column usually */
    color: var(--secondary);
}

/* Loading State for Table */
.data-loading {
    padding: 2rem;
    text-align: center;
    color: var(--primary);
    font-family: 'Space Grotesk', monospace;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 10px var(--primary);
    }

    100% {
        opacity: 0.5;
    }
}