/* ==========================================================================
   HEXA OS 2.1 — wallpapers.css  (Wallpapers gallery app)
   ========================================================================== */
.app.wp { position: relative; overflow: hidden; }
.app.wp [hidden] { display: none !important; }

.wp-bar { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 6px; border-bottom: 1px solid var(--line); background: var(--panel); }
.wp-search-row { display: flex; gap: 8px; }
.wp-search-row .wp-search { flex: 1; min-width: 0; }
.wp-search-row .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.wp-target-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.wp-custom-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wp-custom-row .btn, .wp-target-row .btn { display: inline-flex; align-items: center; gap: 6px; }
.wp-custom-row .btn[hidden], .wp-target-row .btn[hidden] { display: none !important; }
.wp-bar .btn svg, .wp-preview .btn svg { width: 18px; height: 18px; }

.wp-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.wp-chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.wp-chip[aria-pressed="true"] { background: rgba(var(--accent-rgb), .24); border-color: var(--accent); color: var(--text); }
.wp-status { margin: 0; color: var(--muted); font-size: 12.5px; min-height: 18px; }

.wp-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 12px; -webkit-overflow-scrolling: touch; }
.wp-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wp-item { position: relative; min-width: 0; }
.wp-card { display: block; width: 100%; padding: 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-2); color: var(--text); text-align: left; overflow: hidden; position: relative; }
.wp-card:focus-visible, .wp-fav:focus-visible, .wp-chip:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.wp-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; background: #0d0d16 center / cover no-repeat; }
.wp-name { display: block; padding: 8px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.wp-badges { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; flex-wrap: wrap; max-width: calc(100% - 56px); }
.wp-badge { padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(var(--accent-rgb), .9); color: var(--on-accent); }
.wp-badge.lock { background: rgba(var(--accent-2-rgb), .92); }
.wp-fav { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: #fff; }
.wp-fav svg { width: 22px; height: 22px; fill: rgba(0, 0, 0, .45); stroke: #fff; stroke-width: 1.8; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.wp-fav[aria-pressed="true"] svg { fill: #ff6b9a; stroke: #ff6b9a; }
.wp-empty { grid-column: 1 / -1; }

/* preview */
.wp-preview { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.wp-pv-top { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.wp-pv-top .btn { display: inline-flex; align-items: center; gap: 6px; }
.wp-pv-title { flex: 1; min-width: 0; }
.wp-pv-name { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-pv-cat { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-pv-top .icon-btn[aria-label="Next wallpaper"] svg { }
.wp-pv-top .icon-btn:disabled { opacity: .4; }
.wp-stage { position: relative; flex: 1; min-height: 140px; margin: 10px; border-radius: 14px; border: 1px solid var(--line-strong); background: #0d0d16 center / cover no-repeat; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.wp-mock { text-align: center; padding: 10px 16px; border-radius: 12px; background: rgba(0, 0, 0, .28); }
.wp-mock-time { margin: 0; font-size: clamp(34px, 9vw, 58px); font-weight: 300; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.wp-mock-date { margin: 4px 0 0; font-size: 13px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.wp-pv-actions { flex: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 10px 12px; }
.wp-pv-actions .btn { flex: 1 1 auto; justify-content: center; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.wp-pv-actions .btn[aria-pressed="true"] svg { fill: #ff6b9a; stroke: #ff6b9a; }

@media (max-width: 420px) {
  .wp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wp-scroll { padding: 10px; }
}
