﻿/* ===== Library Tab ===== */

/* wraps hamburger button + dropdown; position:relative anchors the dropdown */
.subnav-wrap {
  position: relative;
}

.btn-subnav-hamburger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-subnav-hamburger:hover { color: var(--text); background: var(--row-selected); }

/* dropdown hidden until .subnav-open toggled by JS */
.subnav-wrap .tab-bar {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  z-index: var(--z-dropdown);
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 0;
  margin-bottom: 0;
}
.subnav-wrap .tab-bar.subnav-open {
  display: flex;
}
.subnav-wrap .tab-bar .tab-btn {
  display: block;
  border-radius: 0;
  border: none;
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  text-align: left;
  width: 100%;
  margin: 0;
  color: var(--text);
}
.subnav-wrap .tab-bar .tab-btn:hover { background: var(--row-hover); }
.subnav-wrap .tab-bar .tab-btn.active {
  background: var(--primary);
  color: var(--on-primary);
}

.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: var(--panel-border-width) solid var(--border);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: none;
  border: var(--panel-border-width) solid transparent;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  color: var(--text-muted);
  margin-bottom: calc(-1 * var(--panel-border-width));
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.tab-btn .icon-slot { display: inline-flex; flex-shrink: 0; }
.tab-btn .icon-slot svg { opacity: 0.85; }

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--text);
  border-color: var(--border);
  border-bottom-color: var(--bg);
  background: var(--bg);
}

/* Customer tags */
.customer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.customer-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
}

/* Chrome shared with .btn-delete / .btn-remove-note family in shared.css */
.btn-remove-customer {
  padding: 0;
}

.kit-customer-assign {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.kit-customer-assign select {
  flex: 1;
  padding: 0.3rem 0.5rem;
}

.new-panel-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.new-panel-row input {
  flex: 1;
  padding: 0.38rem 0.6rem;
  background: var(--bg);
}

/* Pricing */
.price-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.price-customer {
  flex: 1;
  color: var(--text-muted);
}

.price-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price-add-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.25rem;
}

.price-add-form select,
.price-add-form input {
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
}

.price-add-form select { background: var(--surface); }
.price-add-form input { background: var(--bg); }

.price-add-form select { flex: 1; }
.price-add-form input  { width: 110px; }
