/* SCUT Lemezkereső - Globális lebegő kereső és helyi listaszűrő stílusok */

/* ==========================================================================
   1. Helyi listaszűrők (Kiszedés és Lehajtandó saját keresője)
   ========================================================================== */
.localSearchCard {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #11151b;
  border: 1px solid #2d3542;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.localSearchRow {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.localSearchIcon {
  position: absolute;
  left: 14px;
  font-size: 18px;
  color: #8c97a8;
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}

.localSearchInput {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 48px !important;
  padding: 11px 40px 11px 44px !important;
  font-size: 16px !important; /* >= 16px megakadályozza az iOS Safari automatikus zoomját */
  background: #181d26 !important;
  border: 1px solid #363f4f !important;
  border-radius: 13px !important;
  color: #fff !important;
  outline: none;
  font-weight: 700;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.localSearchInput:focus {
  border-color: #ff3b46 !important;
  box-shadow: 0 0 0 3px rgba(240, 23, 36, 0.22) !important;
}

.localSearchInput::placeholder {
  color: #7b889b;
  font-weight: 500;
}

.localSearchClearBtn {
  position: absolute;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2b3342 !important;
  color: #d1d8e4 !important;
  border: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: background 0.12s ease, transform 0.1s ease;
}

.localSearchClearBtn:hover {
  background: #3e4a5e !important;
  color: #fff !important;
}

.localSearchClearBtn:active {
  transform: scale(0.92);
}

.localSearchStatus {
  margin-top: 8px;
  padding: 4px 6px 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: #9cb0c8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.localSearchStatus b {
  color: #fff;
}

/* ==========================================================================
   2. Bárhonnan elérhető globális lebegő keresőgomb (FAB)
   ========================================================================== */
#scutGlobalSearchFab {
  position: fixed;
  right: 22px;
  bottom: 88px;
  width: 50px;
  height: 50px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(145deg, #252b36, #14171d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  z-index: 10040;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#scutGlobalSearchFab.hidden {
  display: none !important;
}

#scutGlobalSearchFab:hover {
  transform: scale(1.06);
  background: linear-gradient(145deg, #303744, #1b2028);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.58), 0 0 0 3px rgba(240, 23, 36, 0.32);
}

#scutGlobalSearchFab:active {
  transform: scale(0.93);
}

#scutGlobalSearchFab:focus-visible {
  outline: 3px solid rgba(240, 23, 36, 0.7);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  #scutGlobalSearchFab {
    right: 16px;
    bottom: calc(158px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    font-size: 21px;
  }
}

/* ==========================================================================
   3. Globális gyorskereső modális overlay
   ========================================================================== */
.scut-qs-overlay {
  position: fixed;
  inset: 0;
  z-index: 33000;
  background: rgba(4, 7, 11, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  animation: scutQsFadeIn 0.18s ease-out;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@keyframes scutQsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.scut-qs-modal {
  width: min(680px, 100%);
  max-height: min(840px, calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #1c2027, #13161c);
  border: 1px solid #363e4a;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  color: #f4f5f7;
  animation: scutQsScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes scutQsScaleIn {
  from { transform: scale(0.96) translateY(12px); opacity: 0.7; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

@media (max-width: 700px) {
  .scut-qs-overlay {
    /* Safe area reszponzív felső és alsó padding iPhone notch, Dynamic Island és Home bar kezeléséhez */
    padding: calc(12px + env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    align-items: stretch;
  }
  .scut-qs-modal {
    width: 100%;
    /* 100dvh vagy JS által állított dynamic height (ha billentyűzet nyílik) */
    max-height: calc(var(--scut-qs-vh, 100dvh) - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 20px;
    margin: 0;
  }
  .scut-qs-header {
    padding: 12px 14px 10px;
    gap: 8px;
  }
  .scut-qs-input {
    min-height: 48px !important;
    padding: 10px 38px 10px 40px !important;
    font-size: 16px !important; /* meggátolja az iOS Safari zoomolást */
  }
  .scut-qs-close-btn {
    min-height: 48px;
    padding: 0 12px !important;
    font-size: 13.5px !important;
    border-radius: 12px !important;
  }
  .scut-qs-bar {
    padding: 7px 14px;
    font-size: 11.5px;
  }
  .scut-qs-results {
    padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* 4. Fejléc & Keresőmező a modálisban */
.scut-qs-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #282f3a;
  background: #15181e;
}

.scut-qs-input-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.scut-qs-search-icon {
  position: absolute;
  left: 14px;
  font-size: 19px;
  color: #8c96a5;
  pointer-events: none;
}

.scut-qs-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 50px !important;
  padding: 12px 42px 12px 44px !important;
  font-size: 16px !important;
  background: #0f1216 !important;
  border: 1px solid #3c4452 !important;
  border-radius: 14px !important;
  color: #fff !important;
  outline: none;
  font-weight: 700;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scut-qs-input:focus {
  border-color: #ff3b46 !important;
  box-shadow: 0 0 0 3px rgba(240, 23, 36, 0.22) !important;
}

.scut-qs-clear-btn {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2b323e !important;
  color: #c4ccd8 !important;
  border: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease;
}

.scut-qs-clear-btn:hover {
  background: #3c4656 !important;
  color: #fff !important;
}

.scut-qs-close-btn {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 16px !important;
  border-radius: 13px !important;
  background: #252b35 !important;
  color: #e2e6ec !important;
  border: 1px solid #3c4452 !important;
  font-size: 14px !important;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.scut-qs-close-btn:hover {
  background: #313947 !important;
  color: #fff !important;
}

/* 5. Információs sáv */
.scut-qs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 18px;
  background: #111419;
  border-bottom: 1px solid #232933;
  font-size: 12px;
  color: #8c96a5;
  font-weight: 700;
}

.scut-qs-count {
  color: #adb6c4;
}

.scut-qs-hint {
  font-size: 11.5px;
  color: #727c8d;
}

/* 6. Találati lista container */
.scut-qs-results {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 7. Találati kártya elem */
.scut-qs-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  background: #181c22 !important;
  border: 1px solid #2d3540 !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease, box-shadow 0.14s ease !important;
  position: relative !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28) !important;
  color: #fff !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.scut-qs-card:hover {
  background: #20262f !important;
  border-color: #434e5e !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.scut-qs-card:active {
  transform: scale(0.99) !important;
}

/* Kártya fő adatsor (Kép + Információk) */
.scut-qs-main-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

/* Bélyegkép */
.scut-qs-thumb-wrap {
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  background: #101317;
  border: 1px solid #303742;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.scut-qs-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 11px;
}

.scut-qs-thumb-ph {
  font-size: 26px;
  line-height: 1;
  color: #647082;
  user-select: none;
}

/* Kártya törzs */
.scut-qs-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.scut-qs-code {
  font-size: 19px;
  font-weight: 950;
  color: #fff;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.scut-qs-code mark {
  background: rgba(240, 23, 36, 0.35);
  color: #ff858d;
  border-radius: 4px;
  padding: 0 2px;
}

.scut-qs-name {
  font-size: 13.5px;
  color: #a7b1bf;
  margin-top: 3px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scut-qs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.scut-qs-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  background: #101419;
  border: 1px solid #2b333e;
  color: #d1d7e0;
  line-height: 1.3;
}

.scut-qs-tag.place {
  border-color: #3b4656;
  color: #fff;
}

.scut-qs-tag.stock {
  background: rgba(240, 23, 36, 0.14);
  border-color: rgba(240, 23, 36, 0.35);
  color: #ff9199;
}

.scut-qs-tag.accs {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.scut-qs-tag.acc-sheet-tag {
  background: #141c26;
  border-color: #3b4656;
  color: #93c5fd;
}

/* Tartozék kártya kiemelés */
.scut-qs-acc-card {
  border-left: 4px solid #3b82f6 !important;
}

.scut-qs-acc-thumb {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.28);
}

.scut-qs-acc-code {
  font-size: 17.5px;
  color: #eef4ff;
}

/* Szekció címek */
.scut-qs-section-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 14px 2px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Három kategóriás keresési szekció fejlécek */
.scut-search-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 20px 0 8px;
  user-select: none;
  box-sizing: border-box;
}

.scut-search-section-header:first-child {
  margin-top: 4px;
}

.scut-search-section-header .scut-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scut-search-section-header .scut-section-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* 1. LEMEZEK */
.scut-section-sheets {
  border-left: 4px solid #ef4444 !important;
  color: #fca5a5;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.02) 100%) !important;
}
.scut-section-sheets .scut-section-count {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* 2. TARTOZÉKOK */
.scut-section-accessories {
  border-left: 4px solid #94a3b8 !important;
  color: #e2e8f0;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 0%, rgba(148, 163, 184, 0.02) 100%) !important;
}
.scut-section-accessories .scut-section-count {
  background: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* 3. TELI LEMEZEK */
.scut-section-raw {
  border-left: 4px solid #3b82f6 !important;
  color: #93c5fd;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.02) 100%) !important;
}
.scut-section-raw .scut-section-count {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

#results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

/* Gombok */
.scut-qs-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.scut-qs-act-btn {
  min-height: 38px;
  padding: 0 13px !important;
  font-size: 12.5px !important;
  font-weight: 850 !important;
  border-radius: 10px !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  box-sizing: border-box !important;
}

.scut-qs-btn-view {
  background: #252b36 !important;
  border: 1px solid #3c4656 !important;
  color: #e4e8ef !important;
}

.scut-qs-btn-view:hover {
  background: #313845 !important;
  border-color: #556276 !important;
  color: #fff !important;
}

.scut-qs-btn-add {
  min-width: 44px;
  background: linear-gradient(135deg, #f01724, #c9000c) !important;
  border: 1px solid #ff3b46 !important;
  color: #fff !important;
  font-size: 19px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 4px 14px rgba(227, 6, 19, 0.28) !important;
}

.scut-qs-btn-add:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 18px rgba(227, 6, 19, 0.42) !important;
}

.scut-qs-btn-add:active {
  transform: scale(0.94);
}

.scut-qs-btn-pick {
  background: linear-gradient(180deg, #1c7c3d, #14612e) !important;
  border: 1px solid #2ebd5f !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(28, 124, 61, 0.28) !important;
}

.scut-qs-btn-pick:hover {
  filter: brightness(1.12);
}

.scut-qs-btn-pick:active {
  transform: scale(0.96);
}

@media (max-width: 520px) {
  .scut-qs-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px 13px !important;
    gap: 10px !important;
  }
  .scut-qs-main-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }
  .scut-qs-thumb-wrap {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 11px;
  }
  .scut-qs-actions {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 8px;
    margin-top: 2px;
  }
  .scut-qs-act-btn {
    min-height: 40px;
    font-size: 13px !important;
  }
  .scut-qs-btn-view {
    flex: 1 1 auto;
  }
  .scut-qs-btn-add {
    flex: 0 0 50px;
    min-width: 50px;
  }
}

/* Üres vagy hiba állapot */
.scut-qs-empty {
  padding: 36px 18px;
  text-align: center;
  color: #8c96a5;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed #2e3540;
  border-radius: 16px;
  margin: 12px 0;
}

.scut-qs-empty-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

/* Kiemelés animáció */
.scut-editor-highlight {
  animation: scutPulseHighlight 1.3s ease-out;
}

@keyframes scutPulseHighlight {
  0% {
    box-shadow: 0 0 0 4px rgba(240, 23, 36, 0.65), 0 8px 30px rgba(240, 23, 36, 0.4);
    border-color: #ff3b46 !important;
  }
  100% {
    box-shadow: none;
    border-color: inherit;
  }
}

/* ==========================================================================
   10. Lapozott / Infinite Scroll Sentinel és Loader Stílusok
   ========================================================================== */
.scut-search-sentinel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px 36px;
  color: #8c97a8;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.scut-sentinel-loader {
  display: flex;
  align-items: center;
  gap: 7px;
}

.scut-sentinel-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b46;
  opacity: 0.35;
  animation: scutSentinelBounce 1.2s infinite ease-in-out both;
}

.scut-sentinel-loader span:nth-child(1) { animation-delay: -0.32s; }
.scut-sentinel-loader span:nth-child(2) { animation-delay: -0.16s; }
.scut-sentinel-loader span:nth-child(3) { animation-delay: 0s; }

@keyframes scutSentinelBounce {
  0%, 80%, 100% {
    transform: scale(0.65);
    opacity: 0.25;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
    background: #ff5e67;
    box-shadow: 0 0 10px rgba(240, 23, 36, 0.65);
  }
}

.scut-sentinel-text {
  font-size: 12.5px;
  color: #7d8b9e;
  letter-spacing: 0.2px;
}

.scut-search-end-note {
  text-align: center;
  padding: 20px 16px 36px;
  color: #647387;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scut-search-end-note span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

