/* Google Drive modal (hitl_drive_picker.js) — ported from browser-extension/popup.css */
.psa-drive-folder-dialog {
  max-width: min(420px, 92vw);
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
}
.psa-drive-folder-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}
.psa-drive-folder-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.psa-drive-folder-help {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}
.psa-drive-folder-help code {
  font-size: 11px;
  word-break: break-all;
}
.psa-drive-folder-ta {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  resize: vertical;
  min-height: 120px;
}
.psa-drive-folder-ta[aria-invalid="true"] {
  border-color: #dc2626;
  outline: 1px solid #fecaca;
}
.psa-drive-folder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.psa-drive-folder-dialog > * {
  padding-left: 16px;
  padding-right: 16px;
}
.psa-drive-folder-dialog > .psa-drive-folder-title {
  padding-top: 16px;
}
.psa-drive-folder-dialog > .psa-drive-folder-actions {
  padding-bottom: 16px;
}
.psa-drive-folder-dialog--picker {
  max-width: min(520px, 96vw);
}
.psa-drive-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.psa-drive-list-actions .secondary {
  font-size: 11px;
  padding: 5px 8px;
}
.psa-drive-hidden {
  display: none !important;
}
.psa-drive-source-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
}
.psa-drive-source-btn {
  flex: 1 1 auto;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
}
.psa-drive-source-btn--active {
  background: #fff;
  color: #0f172a;
  border-color: #94a3b8;
}
.psa-drive-folder-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
}
.psa-drive-tab {
  flex: 1 1 auto;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}
.psa-drive-tab--active {
  background: #fff;
  color: #0f172a;
  border-color: #94a3b8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.psa-drive-panel.hidden {
  display: none;
}
.psa-drive-panel--browse,
.psa-drive-panel--paste {
  padding-bottom: 8px;
}
.psa-drive-breadcrumb {
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 8px;
  word-break: break-word;
}
.psa-drive-bc-sep {
  color: #94a3b8;
}
.psa-drive-bc-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: #2563eb;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.psa-drive-bc-current {
  font-weight: 600;
  color: #0f172a;
}
.psa-drive-browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.psa-drive-folder-list {
  max-height: min(40vh, 280px);
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}
.psa-drive-folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 6px 8px 6px 6px;
  font-size: 12px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  color: #0f172a;
}
.psa-drive-folder-row:last-child {
  border-bottom: none;
}
.psa-drive-folder-row:hover {
  background: #f8fafc;
}
.psa-drive-folder-row-check {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}
.psa-drive-folder-open {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  padding: 4px 6px;
  font-size: 12px;
  font-family: inherit;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #1e40af;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.psa-drive-folder-open:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.psa-drive-folder-row--file {
  cursor: default;
}
.psa-drive-file-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psa-drive-folder-row--other {
  cursor: default;
  opacity: 0.88;
  gap: 10px;
}
.psa-drive-other-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psa-drive-other-tag {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #94a3b8;
}
.psa-drive-folder-list-msg {
  padding: 14px 10px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}
.psa-drive-folder-list-msg--err {
  color: #b91c1c;
  text-align: left;
}
.psa-drive-selected-wrap {
  margin-bottom: 8px;
}
.psa-drive-selected-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}
.psa-drive-selected-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(24vh, 160px);
  overflow-y: auto;
  font-size: 11px;
}
.psa-drive-selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 6px;
  background: #f1f5f9;
  border-radius: 6px;
  margin-bottom: 4px;
}
.psa-drive-selected-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
}
.psa-drive-selected-remove {
  flex: 0 0 auto;
  padding: 0 6px;
  font-size: 14px;
  line-height: 1;
  border: none;
  background: none;
  color: #64748b;
  cursor: pointer;
}
.psa-drive-selected-remove:hover {
  color: #b91c1c;
}
.psa-drive-folder-err {
  margin: 0 0 8px;
  font-size: 12px;
  color: #b91c1c;
}
.psa-drive-folder-err.hidden {
  display: none;
}
