/* Bookmark Manager layout, on top of brand.css. */

.import-panel {
  max-width: 44rem;
}
.drop-zone {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.25rem;
  border: 2px dashed var(--steel);
  background: var(--steel-tint);
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.drop-zone svg {
  width: 2rem;
  height: 2rem;
  color: var(--blue);
  flex: none;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--blue);
  background: var(--blue-tint);
}
.or {
  text-align: center;
  color: var(--steel);
  font-size: 0.9rem;
  margin: 0.75rem 0;
}

/* Editor */
.editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.25rem;
}
.editor-bar .policy {
  flex: 1 1 18rem;
  max-width: 28rem;
  margin: 0;
}
.editor-bar .actions {
  margin: 0;
}
.editor {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 52rem) {
  .editor {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
}
.sidebar-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  padding: 0.75rem 1rem 0.35rem;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  background: none;
  border: 0;
  border-left: 4px solid transparent;
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
}
.sidebar-item:hover {
  background: var(--steel-tint);
}
.sidebar-item[aria-current="true"] {
  background: var(--steel-tint);
  border-left-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}
.sidebar-item svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: var(--steel);
}
.sidebar-item[aria-current="true"] svg {
  fill: var(--blue);
}
.sidebar-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-count {
  font-size: 0.85rem;
  color: var(--steel);
  font-variant-numeric: tabular-nums;
}
.sidebar-footer {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--steel-light);
  margin-top: 0.25rem;
}

.main-panel {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
}
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--steel-light);
  background: var(--steel-tint);
}
.breadcrumb {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.breadcrumb button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}
.breadcrumb .sep {
  color: var(--steel);
}
.breadcrumb .here {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bookmark-list {
  flex: 1;
  overflow-x: auto;
}
.bm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.bm-table th {
  text-align: left;
  font-weight: 600;
  color: var(--blue-deep);
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--steel-light);
  white-space: nowrap;
}
.bm-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--steel-light);
  vertical-align: middle;
}
.bm-table tbody tr:last-child td {
  border-bottom: 0;
}
.bm-table tbody tr:hover td {
  background: var(--steel-tint);
}
.td-icon {
  width: 2rem;
  padding-right: 0;
}
.td-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--steel);
  display: block;
}
.td-name {
  font-weight: 600;
  min-width: 10rem;
}
.td-name button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  text-align: left;
}
.td-name button:hover {
  text-decoration: underline;
}
.td-url {
  max-width: 28rem;
}
.td-url a {
  font-family: var(--mono);
  font-size: 0.85rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-meta {
  width: 6rem;
  color: var(--steel);
  font-size: 0.9rem;
  white-space: nowrap;
}
.td-actions {
  width: 10rem;
  text-align: right;
  white-space: nowrap;
}
.td-actions .btn-quiet,
.td-actions .btn-danger {
  padding: 0.15rem 0.4rem;
  font-size: 0.85rem;
}
.bm-table tr[draggable="true"] {
  cursor: grab;
}
.bm-table tr.row-dragging td {
  opacity: 0.4;
}
.bm-table tr.drop-above td {
  border-top: 2px solid var(--blue);
}
.bm-table tr.drop-below td {
  border-bottom: 2px solid var(--blue);
}
.drag-handle {
  color: var(--steel-light);
  font-size: 1.1rem;
  line-height: 1;
  user-select: none;
}

/* Modal: a native dialog dressed as a panel. */
.modal {
  width: min(28rem, calc(100% - 2rem));
  padding: 0;
  border: 1px solid var(--steel-light);
  border-top: 4px solid var(--blue);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(11, 45, 87, 0.25);
}
.modal::backdrop {
  background: rgba(11, 45, 87, 0.35);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0;
}
.modal-title {
  font-size: 1.25rem;
  margin: 0;
}
.modal-close {
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--steel);
  cursor: pointer;
  padding: 0 0.25rem;
}
.modal-close:hover {
  color: var(--ink);
}
.modal-body {
  padding: 1rem 1.25rem 0;
}
.modal-body .context {
  font-size: 0.9rem;
  color: var(--steel);
  margin-bottom: 1rem;
}
.modal .err {
  padding: 0 1.25rem;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem 1.25rem;
}
