/* Embedded styling to support the tab system */
.tab-ribbon {
    display: flex;
    align-items: center;
    width: 100%;
    /* Leaves gap between normal tabs while pushing 'margin-left: auto' items to the end */
    gap: 10px; 
    box-sizing: border-box;
}

/* Pushes this button (and anything after it) all the way to the right side */
.tab-button.exit-button {
    margin-left: auto;
    color: #ff4d4d;
    border-color: rgba(255, 77, 77, 0.4);
    background: rgba(255, 0, 0, 0.05);
}

/* Hover effect for the exit button */
.tab-button.exit-button:hover {
    color: #ff1a1a;
    border-color: #ff4d4d;
    background: rgba(255, 0, 0, 0.15);
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.3);
}

.tab-button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--frame-grey, #888);
    padding: 8px 16px;
    font-family: monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #eee;
    border-color: rgba(255, 255, 255, 0.3);
}

.tab-button.active {
    color: var(--accent-green, #00ff66);
    border-color: var(--accent-green, #00ff66);
    background: rgba(0, 255, 102, 0.05);
}

.large-content-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    margin-top: 15px;
    margin-bottom: 25px;
    min-height: 200px;
    font-family: monospace;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.panel-title {
    font-size: 0.8rem;
    color: var(--accent-green, #00ff66);
    margin-bottom: 15px;
    letter-spacing: 1px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#registered_glyphs.panel-title {
    justify-content: flex-start;
    gap: 8px;
}

.filter-selector {
    width: 25%; 
    box-sizing: border-box; 
    border: 1px solid #000; 
    text-align: center; 
    padding: 5px; 
    font-weight: bold;
}

/* Buttons */

.action-button {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.action-button:hover {
    background: var(--accent-green);
    color: #000;
    box-shadow: 0 0 15px var(--accent-green);
}

.action-button:disabled {
    border-color: #555555; /* A dark/medium retro gray */
    color: #555555;
    cursor: not-allowed; /* Changes the mouse pointer to a "no" sign */
}

/* 2. Suppress the hover effects when disabled */
.action-button:disabled:hover {
    background: transparent; /* Stops background from turning green */
    color: #555555;          /* Keeps text gray instead of snapping to #000 */
    box-shadow: none;        /* Kills the neon glow effect */
}

/* Glyph Registry */

.roster-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    height: 82vh;
    overflow-y: auto;
    display: grid;            
    grid-template-columns: repeat(3, 1fr); /* Create equal columns here */
    gap: 10px;
    align-content: start;
}

/* Compact card layout */
.glyph-matrix-card {
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 10px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.glyph-matrix-card.offline {
    opacity: 0.15;
    filter: grayscale(1);
    pointer-events: none; /* Prevents interaction if needed */
}

.glyph-matrix-card:hover {
    border-color: var(--accent-green);
    background: rgba(66, 244, 133, 0.05);
}

.glyph-identity h3 {
    margin: 0;
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.glyph-info-compact {
    font-size: 0.65rem;
    color: #888;
    font-family: 'Courier New', monospace;
    margin-top: 4px;
}

.glyph-preview {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Glyph Filtering --- */

.filter-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: 'Courier New', monospace;
}

.filter-stack label {
    font-size: 0.65rem;
    color: #888;
    margin-bottom: -5px;
}

.filter-inputs {
    display: flex;
    gap: 10px;
}

.filter-inputs input {
    flex: 1;
    min-width: 0; /* Prevents input from forcing its container to expand */
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-green);
    padding: 8px;
    font-family: 'Courier New', monospace;
}

.filter-stack input:focus {
    border-color: var(--accent-green);
    outline: none;
}

.full-width-input {
    width: 100%;
    box-sizing: border-box;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-green);
    padding: 8px;
    font-family: 'Courier New', monospace;
}

/* Glyph Foundry styles */

.profile-label {
    font-family: 'Courier New', monospace;
    font-size: 0.5rem;
    color: var(--frame-grey);
    text-transform: uppercase;
    margin-top: 12px;
}

.terminal-textarea {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--frame-grey);
    color: var(--accent-green);
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    padding: 8px;
    box-sizing: border-box;
    resize: none;
    margin-top: 5px;
}

.glyph-canvas {
    background: #000;
    border: 1px solid #222;
    image-rendering: pixelated; /* Keeps the cells sharp */
    width: 160px;
    height: 160px;
}

/* density selection sliders */

.slider-track {
    box-shadow: 0 0 8px var(--accent-green);
}

.terminal-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 12px;
    height: 18px;
    border: 1px solid var(--accent-green, #00ff66);
    background: #000;
    cursor: pointer;
    border-radius: 0px; /* Monospace square look */
}

.terminal-range::-moz-range-thumb {
    pointer-events: auto;
    width: 12px;
    height: 18px;
    border: 1px solid var(--accent-green, #00ff66);
    background: #000;
    cursor: pointer;
    border-radius: 0px;
}

/* Ensure the background tracks don't fight each other visually */
.terminal-range::-webkit-slider-runnable-track {
    background: transparent;
    -webkit-appearance: none;
}
.terminal-range::-moz-range-track {
    background: transparent;
}