/* ============================================
   TRS Lookup — Modal + Result Styles
   v1.0 - Matches Hub black/red/white theme
   ============================================ */

/* Modal overlay */
#trs-lookup-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2100;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

.trs-modal {
    background: #0a0a1a;
    border: 1px solid #333;
    border-top: 2px solid #e63946;
    color: #e0e0e0;
    border-radius: 12px;
    width: 520px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.trs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #222;
}

.trs-header h2 {
    margin: 0;
    font-size: 1.1em;
    color: #fff;
}

.trs-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}

.trs-close-btn:hover {
    color: #e63946;
}

.trs-body {
    padding: 12px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.trs-instructions {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 12px;
}

/* Pending source buttons */
.trs-source-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.trs-source-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    border: 1px solid #222;
    border-left: 3px solid #e63946;
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s;
    color: #e0e0e0;
    text-align: left;
}

.trs-source-btn:hover {
    background: #1a1a2e;
    border-color: #e63946;
}

.trs-src-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #fff;
}

.trs-src-type {
    font-size: 0.75em;
    color: #e63946;
    background: rgba(230, 57, 70, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Loading / Error states */
.trs-loading {
    text-align: center;
    color: #e63946;
    padding: 20px;
    font-style: italic;
}

.trs-error {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid #e63946;
    border-radius: 8px;
    padding: 12px 16px;
    color: #e63946;
    font-size: 0.9em;
}

.trs-empty {
    text-align: center;
    color: #666;
    padding: 30px 0;
    font-style: italic;
}

/* Result card */
.trs-result-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.trs-result-header {
    padding: 14px 16px;
    border-bottom: 1px solid #222;
}

.trs-result-trs {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.5px;
}

.trs-result-source {
    font-size: 0.8em;
    color: #888;
    margin-top: 2px;
}

/* Next number — the big deal */
.trs-result-next {
    background: rgba(230, 57, 70, 0.08);
    border-bottom: 1px solid #222;
    padding: 16px;
    text-align: center;
}

.trs-next-label {
    font-size: 0.75em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.trs-next-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #e63946;
    font-family: 'Courier New', monospace;
}

/* Counts breakdown */
.trs-result-counts {
    padding: 14px 16px;
}

.trs-count-title {
    font-size: 0.8em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.trs-count-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #1a1a2e;
}

.trs-count-label {
    font-size: 0.85em;
    color: #ccc;
}

.trs-count-num {
    font-weight: bold;
    font-size: 0.9em;
    color: #fff;
    background: #1a1a2e;
    padding: 2px 10px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
}

.trs-existing-names {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 0 8px;
}

.trs-existing-tag {
    font-size: 0.7em;
    color: #aaa;
    background: #1a1a2e;
    border: 1px solid #222;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.trs-count-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
    font-size: 0.8em;
    color: #888;
    text-align: center;
}

/* ============================================
   TRS Map Overlay Styles
   ============================================ */

/* Single section highlight label */
.trs-map-label div {
    background: rgba(230, 57, 70, 0.85);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
}

/* Grid section number labels */
.trs-grid-label {
    color: rgba(230, 57, 70, 0.5);
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
    font-family: 'Courier New', monospace;
    pointer-events: none;
}

/* Grid tooltip on hover */
.trs-grid-tooltip {
    background: rgba(10, 10, 26, 0.9) !important;
    color: #e63946 !important;
    border: 1px solid #e63946 !important;
    font-family: 'Courier New', monospace !important;
    font-size: 12px !important;
    font-weight: bold !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
}

/* TRS Grid button active/glow state */
.ps-btn-grid-active {
    background: #e63946 !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.6);
    border-color: #e63946 !important;
}