/* ════════════════════════════════════════════════════
   InfraX QMS — gas-archives-module.css
   GAS Archives browser styles
   ════════════════════════════════════════════════════ */

#gas-archives-panel {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: var(--gray-50);
  overflow: hidden;
}
#gas-archives-panel.hidden { display: none; }

/* ─── Topbar ──────────────────────────────────────── */
.ga-topbar {
  height: 56px; flex-shrink: 0;
  background: #7a1040;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.ga-topbar-back {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.8); font-size: 13px; font-weight: 500;
  cursor: pointer; padding: 6px 10px; border-radius: 6px;
  transition: background .15s;
}
.ga-topbar-back:hover { background: rgba(255,255,255,.15); color: #fff; }
.ga-topbar-sep { color: rgba(255,255,255,.3); font-size: 16px; }
.ga-topbar-title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.ga-topbar-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  background: rgba(255,255,255,.2); color: #fff;
  border-radius: 4px; padding: 2px 8px; margin-left: 4px;
}
.ga-topbar-spacer { flex: 1; }
.ga-topbar-count {
  font-size: 12px; color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.1); border-radius: 20px;
  padding: 3px 10px;
}

/* ─── Layout ──────────────────────────────────────── */
.ga-layout {
  flex: 1; display: flex; overflow: hidden;
}

/* ─── Sidebar (filters) ───────────────────────────── */
.ga-sidebar {
  width: 260px; flex-shrink: 0;
  background: #fff;
  border-right: 1.5px solid var(--gray-200);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  padding: 16px;
  gap: 16px;
}

.ga-filter-group label {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: var(--gray-400); text-transform: uppercase;
  margin-bottom: 6px;
}
.ga-filter-group select {
  width: 100%; padding: 7px 10px;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; font-family: var(--font); color: var(--gray-800);
  background: var(--gray-50); outline: none;
  transition: border .15s; cursor: pointer;
}
.ga-filter-group select:focus { border-color: #7a1040; background: #fff; }

.ga-search-wrap {
  position: relative;
}
.ga-search-wrap svg {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); pointer-events: none;
}
.ga-search-wrap input {
  width: 100%; padding: 8px 10px 8px 32px;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; font-family: var(--font); color: var(--gray-800);
  background: var(--gray-50); outline: none; transition: border .15s;
  box-sizing: border-box;
}
.ga-search-wrap input:focus { border-color: #7a1040; background: #fff; }

.ga-filter-reset {
  width: 100%; padding: 7px; border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  background: #fff; cursor: pointer; transition: all .15s;
}
.ga-filter-reset:hover { border-color: #7a1040; color: #7a1040; }

/* ─── Status chips in sidebar ─────────────────────── */
.ga-status-chips { display: flex; flex-direction: column; gap: 5px; }
.ga-status-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  cursor: pointer; font-size: 12px; font-weight: 500;
  color: var(--gray-600); transition: all .15s;
}
.ga-status-chip:hover { border-color: #7a1040; color: #7a1040; }
.ga-status-chip.active { background: #7a1040; color: #fff; border-color: #7a1040; }
.ga-status-chip .ga-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ─── Main content ────────────────────────────────── */
.ga-main {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden;
}

/* ─── Table area ──────────────────────────────────── */
.ga-table-wrap {
  flex: 1; overflow: auto;
  padding: 20px 24px;
}

.ga-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.ga-table th {
  text-align: left; padding: 9px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  color: var(--gray-400); text-transform: uppercase;
  background: #fff;
  border-bottom: 2px solid var(--gray-200);
  position: sticky; top: 0; z-index: 2;
  white-space: nowrap;
}
.ga-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  vertical-align: middle;
}
.ga-table tr { transition: background .1s; cursor: pointer; }
.ga-table tr:hover td { background: var(--pink-pale); }
.ga-table tr.selected td { background: #fdf0f6; }

.ga-doc-num {
  font-family: 'DM Mono', monospace;
  font-weight: 700; color: #7a1040;
  white-space: nowrap;
}
.ga-doc-name {
  font-weight: 600; color: var(--gray-800);
  max-width: 320px;
}
.ga-doc-name small {
  display: block; font-size: 11px; font-weight: 400; color: var(--gray-400); margin-top: 2px;
}
.ga-rev-badge {
  font-size: 11px; font-weight: 700;
  background: var(--gray-100); color: var(--gray-600);
  border-radius: 4px; padding: 2px 7px;
  white-space: nowrap;
}

/* Status badges */
.ga-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; border-radius: 12px; padding: 3px 9px; white-space: nowrap; }
.ga-status--effective { background: #dcfce7; color: #15803d; }
.ga-status--superseded { background: #fef9c3; color: #a16207; }
.ga-status--obsolete { background: #f3f4f6; color: #6b7280; }
.ga-status--proposed { background: #dbeafe; color: #1d4ed8; }

.ga-date { font-size: 12px; color: var(--gray-400); white-space: nowrap; }
.ga-type-tag {
  font-size: 11px; font-weight: 600; color: var(--gray-600);
  background: var(--gray-100); border-radius: 6px;
  padding: 2px 8px; white-space: nowrap;
}

.ga-dl-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 7px;
  font-size: 12px; font-weight: 700;
  background: #7a1040; color: #fff; border: none;
  cursor: pointer; transition: opacity .15s; white-space: nowrap;
  text-decoration: none;
}
.ga-dl-btn:hover { opacity: .85; }
.ga-dl-btn-ghost {
  background: transparent; color: var(--gray-400);
  border: 1.5px solid var(--gray-200);
  padding: 4px 9px; font-size: 11px;
}
.ga-dl-btn-ghost:hover { border-color: var(--gray-400); color: var(--gray-600); }

.ga-dl-btn-sm {
  padding: 4px 7px; font-size: 11px; border-radius: 6px;
}

/* ─── Group / revision rows ───────────────────────────────────── */
.ga-group-row { cursor: pointer; }
.ga-group-row td { border-bottom: 1px solid var(--gray-100); }
.ga-group-row:hover td { background: var(--pink-pale); }
.ga-group-row.selected td { background: #fdf0f6; }

.ga-rev-row { cursor: pointer; background: #fafbfc; }
.ga-rev-row td { border-bottom: 1px dashed var(--gray-100); padding-top: 7px; padding-bottom: 7px; }
.ga-rev-row:hover td { background: #f5f0f8; }
.ga-rev-row.selected td { background: #f0e8f5; }
.ga-rev-row:last-of-type td { border-bottom: 2px solid var(--gray-200); }

/* ─── Expand chevron ──────────────────────────────────────────── */
.ga-expand-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--gray-400); transition: transform .15s;
}
.ga-expand-btn.open { transform: rotate(90deg); }

/* ─── Revision count badge ────────────────────────────────────── */
.ga-rev-count {
  font-size: 10px; font-weight: 700;
  background: var(--pink-pale); color: #7a1040;
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}

/* ─── Version pills in drawer ─────────────────────────────────── */
.ga-ver-pill {
  font-size: 11px; font-weight: 600;
  border: 1.5px solid var(--gray-200);
  border-radius: 20px; padding: 3px 10px;
  color: var(--gray-600); background: #fff;
  cursor: pointer; transition: all .15s;
}
.ga-ver-pill:hover { border-color: #7a1040; color: #7a1040; }
.ga-ver-pill.active { background: #7a1040; color: #fff; border-color: #7a1040; }

/* ─── Empty / loading ─────────────────────────────── */
.ga-empty {
  text-align: center; padding: 60px 20px;
  color: var(--gray-400); font-size: 14px;
}
.ga-empty-icon { font-size: 36px; margin-bottom: 12px; }
.ga-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; color: var(--gray-400); min-height: 200px;
  font-size: 14px;
}

/* ─── Detail drawer ───────────────────────────────── */
.ga-drawer {
  width: 380px; flex-shrink: 0;
  border-left: 1.5px solid var(--gray-200);
  background: #fff; display: flex; flex-direction: column;
  overflow: hidden; transition: width .2s;
}
.ga-drawer.hidden { width: 0; border-left: none; overflow: hidden; }
.ga-drawer-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: flex-start; gap: 10px;
}
.ga-drawer-head-info { flex: 1; min-width: 0; }
.ga-drawer-num {
  font-family: 'DM Mono', monospace; font-size: 11px;
  font-weight: 700; color: #7a1040; margin-bottom: 4px;
}
.ga-drawer-name {
  font-size: 14px; font-weight: 700; color: var(--gray-800);
  line-height: 1.3; word-break: break-word;
}
.ga-drawer-close {
  flex-shrink: 0; padding: 4px; border-radius: 6px;
  color: var(--gray-400); transition: all .15s;
}
.ga-drawer-close:hover { background: var(--gray-100); color: var(--gray-800); }

.ga-drawer-body { flex: 1; overflow-y: auto; padding: 14px 18px; }

.ga-meta-row {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 14px;
}
.ga-meta-label {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--gray-400);
}
.ga-meta-value {
  font-size: 13px; color: var(--gray-800); line-height: 1.45;
}
.ga-meta-value.mono { font-family: 'DM Mono', monospace; font-size: 12px; }
.ga-meta-section {
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--gray-400);
  padding: 10px 0 6px;
  border-top: 1px solid var(--gray-200);
  margin-top: 4px;
}

.ga-drawer-footer {
  padding: 12px 18px; border-top: 1px solid var(--gray-200);
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* ─── Pagination ──────────────────────────────────── */
.ga-pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-top: 1px solid var(--gray-200);
  background: #fff; flex-shrink: 0;
}
.ga-page-btn {
  min-width: 32px; height: 32px; border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  font-size: 13px; font-weight: 600; color: var(--gray-600);
  background: #fff; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px;
}
.ga-page-btn:hover:not(:disabled) { border-color: #7a1040; color: #7a1040; }
.ga-page-btn.active { background: #7a1040; color: #fff; border-color: #7a1040; }
.ga-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.ga-page-info { font-size: 12px; color: var(--gray-400); padding: 0 6px; }
