/* ==========================================================================
   JB AtlaZZ | Version 210 | css/find.css
   Created by Dean Senecal and Sparky
   Purpose: Song search, retrieval and import interface
   Documentation updated: 2026-10-20
   Original creation date: not independently verified
   Maintenance: edit the named sections; keep change history in README_VERSION_210.txt
   ========================================================================== */

/* --- Find Song interface ---
   Maintenance: Provider coordination is in find.js and js/find/providers/.
*/
/* --- Find window and results ---
   Maintenance: selectors below control this part of the find interface.
   Change dimensions/colors here; check media-query overrides before adjusting widths.
*/
.find-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0,0,0,.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.find-overlay.is-hidden {
  display: none;
}

.find-panel {
  width: min(1050px,96vw);
  height: min(760px,92vh);
  background: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.find-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #bbb;
  background: #e9e9e9;
}

.find-head h2 {
  margin: 0;
  font-size: 20px;
}

.find-close {
  border: 0;
  background: #b3261e;
  color: white;
  border-radius: 6px;
  width: 36px;
  height: 32px;
  font-weight: 700;
}

.find-form {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr auto;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #ccc;
}

.find-form label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
}

.find-form input,.find-form select {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: 4px;
  border: 1px solid #aaa;
  border-radius: 6px;
  padding: 0 9px;
  background: white;
}

.find-search {
  align-self: end;
  height: 36px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  background: #2e7d32;
  color: #fff;
  font-weight: 700;
}

.find-status {
  min-height: 34px;
  padding: 9px 18px;
  font-size: 12px;
  color: #555;
}

.find-results {
  flex: 1;
  overflow: auto;
  padding: 0 18px 18px;
}

.find-result {
  display: grid;
  gap: 14px;
  align-items: center;
  background: white;
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 12px 14px;
  margin-bottom: 8px;
  grid-template-columns: minmax(260px,1fr) 100px 90px 130px;
}

.find-result-title {
  font-weight: 700;
}

.find-result-url {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.find-badge {
  font-size: 12px;
}

.find-open {
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #3b8ed0;
  color: white;
  font-weight: 700;
}

.find-empty {
  padding: 40px 10px;
  text-align: center;
  color: #777;
}

.find-note {
  padding: 10px 18px;
  border-top: 1px solid #ccc;
  background: #eee;
  font-size: 11px;
  color: #555;
}

.find-actions {
  display: flex;
  gap: 6px;
}

.find-import {
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #2e7d32;
  color: #fff;
  font-weight: 700;
}

.find-import-overlay {
  position: fixed;
  inset: 0;
  z-index: 430;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.find-import-overlay.is-hidden {
  display: none;
}

.find-import-panel {
  width: min(1000px,96vw);
  height: min(760px,92vh);
  background: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.find-import-help {
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid #ccc;
}

.find-import-panel textarea {
  flex: 1;
  margin: 14px 18px;
  resize: none;
  padding: 14px;
  font: 15px/1.35 Consolas,monospace;
  white-space: pre;
  overflow: auto;
}

.find-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #ccc;
}

.find-import-actions button {
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: #555;
  color: #fff;
  font-weight: 700;
}

.find-import-actions .find-import-go {
  background: #2e7d32;
}

.find-working {
  position: fixed;
  inset: 0;
  z-index: 460;
  background: rgba(245,245,245,.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.find-working.is-hidden {
  display: none;
}

.find-working-card {
  text-align: center;
  max-width: 460px;
  padding: 36px 42px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}

.find-working-card h2 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.find-working-card p {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.find-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border: 6px solid #ddd;
  border-top-color: #555;
  border-radius: 50%;
  animation: jb-find-spin .85s linear infinite;
}

.find-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 455;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.find-preview-overlay.is-hidden {
  display: none;
}

.find-preview-panel {
  width: min(1050px,96vw);
  height: min(820px,94vh);
  background: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.find-preview-subtitle {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
  font-weight: 700;
}

.find-preview-meta {
  padding: 10px 18px;
  border-bottom: 1px solid #ccc;
  font-weight: 700;
  background: #fff;
}

.find-preview-text {
  flex: 1;
  overflow: auto;
  margin: 0;
  padding: 18px;
  background: #fff;
  white-space: pre-wrap;
  font: 14px/1.35 Consolas,monospace;
}

.find-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #ccc;
  background: #eee;
}

.find-preview-actions button {
  height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: #555;
  color: #fff;
  font-weight: 700;
}

.find-preview-actions .find-preview-save {
  background: #2e7d32;
}

.find-viewed {
  font-size: 11px;
  color: #2e7d32;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.find-artist-group {
  margin: 10px 0 18px;
}

.find-artist-heading {
  margin: 12px 0 8px;
  padding: 7px 10px;
  border-bottom: 2px solid #aaa;
  font-size: 17px;
}

.find-artist-group .find-result {
  margin-left: 12px;
}


/* --- Responsive Find Song ---
   Maintenance: Small-screen adjustments.
*/
/* --- Responsive layout ---
   Maintenance: selectors below control this part of the find interface.
   Change dimensions/colors here; check media-query overrides before adjusting widths.
*/
@media (max-width:760px) {
/* --- Find window and results ---
   Maintenance: selectors below control this part of the find interface.
   Change dimensions/colors here; check media-query overrides before adjusting widths.
*/
.find-form {
  grid-template-columns: 1fr;
}

.find-result {
  grid-template-columns: 1fr 90px;
}

.find-result-url {
  grid-column: 1/-1;
}
}

@keyframes jb-find-spin{to{transform:rotate(360deg);}}
