/* Monitor okazji – sekcja „Okazje dnia” na pulpicie właściciela (dashboard.html), prefiks okz-dash.
   Wersja 2: 5 kart ze zdjęciami, przycisk „Ukryj”, bez emotek. Treść wstawia assets/js/okazje-pulpit.js.
   Wersja 2.0 (20.10.2026): komunikat „Dziś bez okazji” (okz-dash--calm). */
.okz-dash {
  width: auto;
  margin: 16px 0;
  padding: 20px 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 122, 61, .3);
  background: linear-gradient(160deg, rgba(255, 122, 61, .09), rgba(13, 20, 42, .0) 42%), rgba(13, 20, 42, .9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
.okz-dash[hidden] { display: none !important; }
.okz-dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.okz-dash-title { margin: 0; font: 800 19px/1.2 "Sora", Inter, "Segoe UI", system-ui, sans-serif; color: #fff; letter-spacing: .01em; }
.okz-dash-sub { margin: 5px 0 0; color: var(--text-muted, #9fa6bb); font-size: 13px; }
.okz-dash-actions { display: flex; align-items: center; gap: 8px; }
.okz-dash-all {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 16px; border-radius: 999px;
  background: linear-gradient(110deg, #ff5f45 0%, #ff8a3d 55%, #ffc24a 100%);
  color: #1b0e06; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.okz-dash-all:hover { filter: brightness(1.08); }
.okz-dash-hide {
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16); background: transparent;
  color: var(--text-muted, #9fa6bb); font-weight: 600; font-size: 13px; cursor: pointer;
}
.okz-dash-hide:hover { color: #fff; border-color: rgba(255, 255, 255, .32); }

.okz-dash-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.okz-dash-card {
  display: flex; flex-direction: column; min-width: 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(17, 26, 52, .95);
  color: inherit; text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.okz-dash-card:hover { transform: translateY(-2px); border-color: rgba(255, 122, 61, .6); box-shadow: 0 14px 34px rgba(255, 122, 61, .16); }
.okz-dash-photo { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 12px; background: #fff; overflow: hidden; }
/* zdjęcie zawsze w całości w ramce (zdjęcia z Allegro 360 px nie mogą wystawać poza kwadrat) */
.okz-dash-photo img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; max-width: none; max-height: none;
  padding: 12px; box-sizing: border-box; object-fit: contain;
}
.okz-dash-photo.is-empty {
  background: #e9ecf2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3.5' y='5' width='17' height='14' rx='2.5' fill='none' stroke='%23b9c0ce' stroke-width='1.6'/%3E%3Ccircle cx='9' cy='10' r='1.7' fill='%23b9c0ce'/%3E%3Cpath d='M5 17l4.5-4.5 3 3 2.5-2.5L19 17' fill='none' stroke='%23b9c0ce' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / 38% no-repeat;
}
.okz-dash-info { display: flex; flex-direction: column; gap: 7px; padding: 12px; min-width: 0; }
.okz-dash-name {
  min-height: 2.6em;
  font-weight: 700; font-size: 13.5px; line-height: 1.3; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.okz-dash-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.okz-dash-price b { font-size: 17px; color: #fff; white-space: nowrap; }
.okz-dash-pct {
  padding: 4px 8px 3px; border-radius: 8px;
  background: linear-gradient(110deg, #ff5f45 0%, #ff8a3d 55%, #ffc24a 100%); color: #1b0e06;
  font: 400 18px/1 "Bebas Neue", Impact, "Arial Narrow", sans-serif; letter-spacing: .03em;
}
.okz-dash-meta { color: var(--text-muted, #9fa6bb); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 2.0: dziś bez okazji – jedna linia z odnośnikiem do „Potaniało” zamiast kart */
.okz-dash--calm { border-color: rgba(59, 209, 155, .28); background: linear-gradient(160deg, rgba(59, 209, 155, .07), rgba(13, 20, 42, .0) 42%), rgba(13, 20, 42, .9); }
.okz-dash-calm { margin: 12px 0 0; color: #bdf5df; font-size: 14px; line-height: 1.5; }
.okz-dash-calm a { margin-left: 6px; color: #7ff0c3; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.okz-dash-toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 9999; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: calc(100% - 32px);
  padding: 12px 12px 12px 16px; border-radius: 14px;
  background: #1b2647; border: 1px solid rgba(255, 255, 255, .14); color: #eef3ff;
  font-size: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.okz-dash-toast[hidden] { display: none; }
.okz-dash-toast button { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 7px 12px; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; cursor: pointer; }

/* tablet i telefon: pasek przewijany w bok (5 kart, widać, że jest więcej) */
@media (max-width: 1100px) {
  .okz-dash-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(170px, 23%);
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .okz-dash-card { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .okz-dash { padding: 16px 14px 16px; }
  .okz-dash-head { flex-direction: column; }
  .okz-dash-actions { width: 100%; }
  .okz-dash-all { flex: 1; justify-content: center; }
  .okz-dash-grid { grid-auto-columns: 44%; gap: 10px; }
  .okz-dash-photo { padding: 8px; }
  .okz-dash-photo img { padding: 8px; }
  .okz-dash-info { padding: 10px; }
  .okz-dash-price b { font-size: 15.5px; }
  .okz-dash-pct { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .okz-dash-card { transition: none; } }
