/* ============================================================================
 * MelóPont — közös kereső-fejléc + élő találati panel · v1 (2026.09.30)
 * ----------------------------------------------------------------------------
 * HASZNÁLJA: browse.html (Böngészés, belépve) és index.html (kezdőlap).
 * Egy dizájn, egy hely: a kék kártya, a nagy kerek keresőmező, a törlés-gomb,
 * az „üveg” chipek és a kezdőlapi élő találati panel (.ls-*) stílusa.
 * Tokenek: melopont-style.css :root (--mp-*), itt: --br-* (kereső-fejléc).
 * Minimum betűméret 13px.
 * ========================================================================== */
:root {
  --br-hero-from: #0A66C2;
  --br-hero-to: #0B3D91;
  --br-on-hero: #FFFFFF;
  --br-on-hero-muted: #DCE8F7;
  /* Címkék (chipek, felső jelvény) a kék kártyán: EGYSZÍNŰ fehér alap, sötétkék
     szöveg (kontraszt ~10:1). Az áttetsző „üveg” változat a színátmenet fölött
     foltos és rosszul olvasható volt (László, 09.30). */
  --br-chip-bg: #FFFFFF;
  --br-chip-text: #0B3D91;
  --br-chip-hover: #E8F0FE;
  --br-shadow-lg: 0 18px 40px -18px rgba(11, 61, 145, .45);
  --br-soft: var(--mp-surface-2, #F6F8FB);
  --br-soft-hover: #EDF1F7;
  --br-mark-bg: #FFE9A8;
  --br-worker-from: #0A66C2;
  --br-worker-to: #3B8BE0;
  --br-company-from: #057642;
  --br-company-to: #2FA36B;
  --ls-shadow: 0 24px 60px -12px rgba(15, 23, 42, .28), 0 2px 6px rgba(15, 23, 42, .08);
}

.br-hero [hidden] { display: none !important; }

/* ── Hero ── */
.br-hero {
  position: relative; overflow: hidden; border-radius: 24px;
  background-color: var(--br-hero-from);
  background-image: linear-gradient(135deg, var(--br-hero-from), var(--br-hero-to));
  box-shadow: var(--br-shadow-lg);
}
/* Fénypöttyök és halvány pontrács külön rétegben (a szöveg alatti háttér így
   egyértelműen a sötétkék színátmenet — ezt méri a kontrasztmérő is). */
.br-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 240px at 90% -10%, rgba(34, 197, 94, .35), transparent 60%),
    radial-gradient(500px 260px at -10% 110%, rgba(255, 255, 255, .14), transparent 60%);
}
.br-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.br-hero-inner { position: relative; z-index: 1; padding: 32px 32px 26px; max-width: 760px; }
.br-hero .br-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--br-chip-bg); border: 1px solid var(--br-chip-bg);
  color: var(--br-chip-text); font-size: calc(14px * var(--mp-fs, 1)); font-weight: 700; letter-spacing: .2px;
}
.br-hero .br-eyebrow span, .br-hero .br-eyebrow svg { color: var(--br-chip-text); }
.br-hero h1 { color: var(--br-on-hero); font-size: calc(32px * var(--mp-fs, 1)); font-weight: 800; line-height: 1.15; margin-top: 12px; letter-spacing: -.3px; }
.br-hero .br-sub { color: var(--br-on-hero-muted); font-size: calc(16px * var(--mp-fs, 1)); margin-top: 6px; }

.br-search { position: relative; margin-top: 20px; }
.br-search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--mp-blue); pointer-events: none; }
.br-input {
  width: 100%; min-height: 60px; padding: 14px 56px 14px 56px;
  border: 0; border-radius: 999px; background: var(--mp-white);
  font: inherit; font-size: calc(18px * var(--mp-fs, 1)); color: var(--mp-text-primary);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35), 0 0 0 4px rgba(255, 255, 255, .18);
  -webkit-appearance: none; appearance: none; transition: box-shadow .2s;
}
.br-input::-webkit-search-cancel-button { display: none; }
.br-input::placeholder { color: var(--mp-text-muted); }
.br-input:focus { outline: none; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35), 0 0 0 5px rgba(34, 197, 94, .55); }
.br-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--br-soft); color: var(--mp-text-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.br-clear:hover { background: var(--br-soft-hover); color: var(--mp-text-primary); }

.br-quick, .br-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.br-hero .br-quick-label, .br-hero .br-recent-label { color: var(--br-on-hero-muted); font-size: calc(14px * var(--mp-fs, 1)); font-weight: 600; }
.br-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 14px;
  border-radius: 999px; font: inherit; font-size: calc(14px * var(--mp-fs, 1)); font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
}
.br-chip:active { transform: scale(.97); }
.br-chip--solid { background: var(--br-chip-bg); border: 1px solid var(--br-chip-bg); color: var(--br-chip-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.br-chip--solid:hover { background: var(--br-chip-hover); border-color: var(--br-chip-hover); }
.br-hero .br-chip--solid, .br-hero .br-chip--solid span, .br-hero .br-chip--solid svg { color: var(--br-chip-text); }
.br-hero .br-hint { color: var(--br-on-hero-muted); font-size: calc(14px * var(--mp-fs, 1)); margin-top: 12px; }


/* Kerek „Keresés” gomb a mező jobb szélén (kezdőlap). Ha van, a törlés-gomb
   elé kerül, a szövegnek pedig több hely kell jobbra. */
.br-search--go .br-input { padding-right: 108px; }
.br-search--go .br-clear { right: 60px; }
.br-go {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mp-blue); color: var(--mp-white);
  transition: background .15s, transform .1s;
}
.br-go:hover { background: var(--mp-blue-hover); }
.br-go:active { transform: translateY(-50%) scale(.95); }
.br-go:focus-visible, .br-clear:focus-visible { outline: 3px solid var(--mp-white); outline-offset: 2px; }
.br-go svg { width: 22px; height: 22px; }
/* Link-chip (a kezdőlapon a kategória-chipek linkek) */
a.br-chip, a.br-chip:hover { text-decoration: none; }
.br-hero a.br-chip--solid, .br-hero a.br-chip--solid:hover { color: var(--br-chip-text); }
.br-chip svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Élő találati panel (kezdőlap) — a body-ra kerül, position: fixed ── */
.ls-panel {
  position: fixed; z-index: 9999; display: none;
  background: var(--mp-white); border: 1px solid var(--mp-card-border); border-radius: 18px;
  box-shadow: var(--ls-shadow); overflow-y: auto; overscroll-behavior: contain;
  color: var(--mp-text-primary); font-size: calc(15px * var(--mp-fs, 1)); line-height: 1.4;
  -webkit-overflow-scrolling: touch;
}
.ls-panel.is-open { display: block; animation: ls-in .16s ease-out; }
.ls-panel.is-busy .ls-body { opacity: .55; transition: opacity .15s; }
@keyframes ls-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.ls-head {
  position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  padding: 12px 16px; background: var(--mp-white); border-bottom: 1px solid var(--mp-card-border);
}
.ls-panel .ls-head-title { font-size: calc(15px * var(--mp-fs, 1)); font-weight: 800; color: var(--mp-text-primary); }
.ls-panel .ls-head-meta { font-size: calc(14px * var(--mp-fs, 1)); font-weight: 600; color: var(--mp-text-muted); }

.ls-section { padding: 6px 0; }
.ls-section + .ls-section { border-top: 1px solid var(--mp-card-border); }
.ls-panel .ls-section-title {
  padding: 8px 16px 4px; font-size: calc(14px * var(--mp-fs, 1)); font-weight: 700; letter-spacing: .3px; color: var(--mp-text-muted);
}
.ls-panel a.ls-row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px;
  color: var(--mp-text-primary); text-decoration: none; cursor: pointer;
}
.ls-panel a.ls-row:hover, .ls-panel a.ls-row.is-active { background: var(--br-soft-hover); color: var(--mp-text-primary); text-decoration: none; }
.ls-icon {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mp-blue-light); color: var(--mp-blue);
}
.ls-icon svg { width: 18px; height: 18px; }
.ls-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: calc(15px * var(--mp-fs, 1)); font-weight: 800; color: var(--mp-white);
  background: linear-gradient(135deg, var(--br-worker-from), var(--br-worker-to));
}
.ls-avatar--company { background: linear-gradient(135deg, var(--br-company-from), var(--br-company-to)); }
.ls-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ls-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ls-panel .ls-title { font-size: calc(15px * var(--mp-fs, 1)); font-weight: 700; color: var(--mp-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-panel .ls-sub { font-size: calc(14px * var(--mp-fs, 1)); color: var(--mp-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-panel .ls-pill {
  flex-shrink: 0; padding: 3px 10px; border-radius: 999px; font-size: calc(14px * var(--mp-fs, 1)); font-weight: 700;
  background: var(--br-soft); color: var(--mp-text-muted);
}
.ls-panel .ls-pill--company { background: var(--mp-green-light); color: var(--mp-green); }
.ls-panel .ls-pill--worker { background: var(--mp-blue-light); color: var(--mp-blue-hover); }
.ls-panel .ls-role { display: none; }
.ls-panel mark { background: var(--br-mark-bg); color: inherit; border-radius: 3px; padding: 0; }

.ls-foot {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px;
  background: var(--mp-white); border-top: 1px solid var(--mp-card-border);
}
.ls-panel a.ls-btn {
  flex: 1 1 180px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 14px; border-radius: 12px; font-size: calc(14px * var(--mp-fs, 1)); font-weight: 700;
  text-decoration: none; border: 1px solid var(--mp-card-border); background: var(--br-soft); color: var(--mp-text-primary);
}
.ls-panel a.ls-btn:hover, .ls-panel a.ls-btn.is-active { background: var(--br-soft-hover); color: var(--mp-text-primary); text-decoration: none; }
.ls-panel a.ls-btn--primary { background: var(--mp-blue); border-color: var(--mp-blue); color: var(--mp-white); }
.ls-panel a.ls-btn--primary:hover, .ls-panel a.ls-btn--primary.is-active { background: var(--mp-blue-hover); color: var(--mp-white); }
.ls-panel a.ls-btn--primary span, .ls-panel a.ls-btn--primary svg { color: var(--mp-white); }
.ls-panel a.ls-btn.is-active { outline: 3px solid var(--mp-blue-light); }
.ls-btn svg { width: 16px; height: 16px; }

.ls-empty { padding: 22px 16px; text-align: center; }
.ls-panel .ls-empty-title { font-size: calc(15px * var(--mp-fs, 1)); font-weight: 800; color: var(--mp-text-primary); }
.ls-panel .ls-empty-text { margin-top: 4px; font-size: calc(14px * var(--mp-fs, 1)); color: var(--mp-text-muted); }
.ls-panel .ls-error { padding: 18px 16px; text-align: center; font-size: calc(14px * var(--mp-fs, 1)); color: var(--mp-red); }
.ls-panel .ls-retry { margin-left: 6px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--mp-blue); cursor: pointer; text-decoration: underline; }
.ls-skel { height: 52px; margin: 6px 16px; border-radius: 12px; background: linear-gradient(90deg, var(--mp-card-border) 25%, var(--br-soft) 50%, var(--mp-card-border) 75%); background-size: 200% 100%; animation: ls-shimmer 1.4s infinite; }
@keyframes ls-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) { .ls-panel.is-open, .ls-skel { animation: none; } }

@media (max-width: 520px) {
  .br-hero { border-radius: 20px; }
  .br-hero-inner { padding: 22px 16px 18px; }
  .br-hero h1 { font-size: calc(26px * var(--mp-fs, 1)); }
  .br-input { font-size: calc(16px * var(--mp-fs, 1)); min-height: 54px; padding-left: 50px; }
  .br-search-icon { left: 17px; }
  .br-search--go .br-input { padding-right: 100px; }
  .br-go { width: 42px; height: 42px; right: 6px; }
  .br-search--go .br-clear { right: 54px; width: 38px; height: 38px; }
  .ls-foot { padding: 10px 12px; }
  .ls-panel a.ls-btn { flex-basis: 120px; white-space: nowrap; }
  .ls-panel a.ls-row { padding: 8px 12px; }
  .ls-panel .ls-pill--worker, .ls-panel .ls-pill--company { display: none; }
  .ls-panel .ls-role { display: inline; }
}
