/* Huutokaupat (2026-11-03) — julkinen osio ja hallinta. Käyttää style.css:n muuttujia. */

.hk-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }
.hk-preview { background: #fff4e5; border: 1px solid var(--warning); color: #8a5300;
  border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; font-size: 0.9rem; }
.flash-warning { background: #fff4e5; color: #8a5300; border: 1px solid var(--warning); }

.hk-hero { background: var(--primary); color: #fff; border-radius: var(--radius);
  padding: 24px; margin: 16px 0 24px; display: flex; gap: 24px; align-items: center;
  flex-wrap: wrap; }
.hk-hero h1 { margin: 0 0 6px; font-size: 1.7rem; }
.hk-hero p { margin: 0; opacity: 0.92; max-width: 640px; }
.hk-hero a { color: #fff; }
.hk-hero-links { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.hk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 6px; border: 1px solid transparent; font-weight: 600;
  font-size: 0.95rem; cursor: pointer; text-decoration: none; line-height: 1.2;
  background: var(--accent); color: #fff; font-family: inherit; }
.hk-btn:hover { background: var(--accent-dark); }
.hk-btn-secondary { background: #fff; color: var(--primary); border-color: var(--border); }
.hk-btn-secondary:hover { background: var(--bg-hover); }
.hk-btn-light { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.4); }
.hk-btn-light:hover { background: rgba(255,255,255,0.25); }
.hk-btn-danger { background: var(--danger); }
.hk-btn-danger:hover { background: var(--danger-dark); }
.hk-btn-small { padding: 6px 12px; font-size: 0.85rem; }
.hk-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.hk-section-title { font-size: 1.25rem; margin: 28px 0 12px; color: var(--primary); }
.hk-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hk-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text); text-decoration: none; font-size: 0.85rem; }
.hk-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.hk-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); }
.hk-card:hover { border-color: var(--primary-light); }
.hk-card-img { aspect-ratio: 4 / 3; background: var(--bg-hover); display: flex;
  align-items: center; justify-content: center; position: relative; }
.hk-card-img img { width: 100%; height: 100%; object-fit: cover; }
.hk-badge { position: absolute; top: 8px; left: 8px; background: var(--primary); color: #fff;
  font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.hk-badge-warn { background: var(--danger); }
.hk-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hk-card-title { font-weight: 600; line-height: 1.3; }
.hk-card-meta { font-size: 0.8rem; color: var(--text-light); }
.hk-card-price { display: flex; justify-content: space-between; align-items: baseline;
  margin-top: auto; gap: 8px; }
.hk-price { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.hk-time { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.hk-time.urgent { color: var(--danger); }
.hk-empty { background: #fff; border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 24px; color: var(--text-light); }

/* Kohdesivu */
.hk-lot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 28px;
  margin-top: 8px; }
@media (max-width: 860px) { .hk-lot { grid-template-columns: minmax(0, 1fr); } }
.hk-lot > div { min-width: 0; }
.hk-box { overflow-wrap: anywhere; }
.hk-gallery-main { background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hk-gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hk-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hk-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none;
  cursor: pointer; width: 72px; height: 54px; overflow: hidden; }
.hk-thumbs button.active { border-color: var(--accent); }
.hk-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.hk-lot h1 { font-size: 1.5rem; margin: 0 0 4px; }
.hk-lotno { color: var(--text-light); font-size: 0.85rem; }
.hk-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; }
.hk-bidbox .hk-price { font-size: 2rem; }
.hk-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0;
  border-bottom: 1px solid var(--bg-hover); font-size: 0.92rem; }
.hk-row:last-child { border-bottom: none; }
.hk-row span:first-child { color: var(--text-light); }
.hk-countdown { font-size: 1.15rem; font-weight: 700; }
.hk-status { border-radius: 6px; padding: 10px 12px; font-weight: 600; margin: 10px 0; font-size: 0.92rem; }
.hk-status-lead { background: #e8f8f0; color: #1e8449; }
.hk-status-outbid { background: #fef0f0; color: var(--danger-dark); }
.hk-status-info { background: var(--bg-primary-light); color: var(--primary); }
.hk-bidform { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.hk-bidform .hk-amount { display: flex; gap: 8px; }
.hk-bidform input[type="text"] { flex: 1; font-size: 1.1rem; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 6px; min-width: 0; }
.hk-bidform label.hk-terms { font-size: 0.85rem; display: flex; gap: 8px; align-items: flex-start; }
.hk-help { font-size: 0.8rem; color: var(--text-light); margin: 0; }
.hk-blockers { margin: 10px 0 0; padding-left: 18px; font-size: 0.9rem; }
.hk-history { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.hk-history td { padding: 6px 4px; border-bottom: 1px solid var(--bg-hover); }
.hk-history td:nth-child(2) { text-align: right; font-weight: 600; }
.hk-history .mine td { background: #fff8ef; }
.hk-desc { white-space: pre-line; line-height: 1.55; }
.hk-terms-page table { border-collapse: collapse; margin: 8px 0 16px; }
.hk-terms-page td, .hk-terms-page th { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }

/* Hallinta */
.hk-admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 16px; }
.hk-admin-tabs a { padding: 7px 12px; border-radius: 6px; text-decoration: none; color: var(--text);
  background: #fff; border: 1px solid var(--border); font-size: 0.88rem; }
.hk-admin-tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.hk-panel { background: #f7f8fa; border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 16px; margin: 0 0 16px; }
.hk-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.hk-form-grid .wide { grid-column: 1 / -1; }
.hk-field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; }
.hk-field input, .hk-field select, .hk-field textarea { width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px; font: inherit; box-sizing: border-box; }
.hk-field textarea { min-height: 110px; }
.hk-field .err { color: var(--danger); font-size: 0.82rem; margin-top: 3px; }
.hk-field small { color: var(--text-light); }
.hk-img-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.hk-img-grid figure { margin: 0; width: 150px; }
.hk-img-grid img { width: 150px; height: 112px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); }
.hk-img-grid figcaption { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.hk-inline { display: inline; }
.hk-muted { color: var(--text-light); font-size: 0.85rem; }
.hk-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem;
  font-weight: 700; background: var(--bg-hover); color: var(--text); }
.hk-tag-live { background: #e8f8f0; color: #1e8449; }
.hk-tag-warn { background: #fef0f0; color: var(--danger-dark); }
.hk-tag-wait { background: #fff4e5; color: #8a5300; }

/* Huutotapa: yksittäinen huuto / korotusautomaatti (4.11.2026) */
.hk-mode { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.hk-mode legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hk-mode label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; line-height: 1.4;
                 padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.hk-mode label:has(input:checked) { border-color: var(--primary); background: rgba(26, 82, 118, 0.06); }
.hk-mode input { margin-top: 3px; }

/* Avautumisilmoitus ja laskuri (Jarno 4.11.2026): etusivun hero + /huutokauppa ennen avausta. */
.hk-teaser { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 20px;
  padding: 12px 14px; border-radius: var(--radius); background: rgba(8, 28, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; text-decoration: none; line-height: 1.35; }
.hk-teaser:hover { background: rgba(8, 28, 46, 0.72); color: #fff; }
.hk-teaser-badge { background: var(--accent); color: #fff; font-weight: 800; font-size: 0.72rem;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.hk-teaser-text { font-weight: 700; font-size: 1rem; }
.hk-teaser-more { font-weight: 700; color: #f8c471; white-space: nowrap; margin-left: auto; }
.hk-cd { display: inline-flex; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.hk-cd[hidden], .hk-cd-soon[hidden] { display: none; }
.hk-cd-unit { background: rgba(255, 255, 255, 0.14); border-radius: 4px; padding: 2px 7px;
  white-space: nowrap; font-size: 0.85rem; }
.hk-cd-unit b { font-size: 1.05rem; }
.hk-cd-soon { font-weight: 700; }
.hk-cd-big { gap: 10px; margin: 18px 0 4px; }
.hk-cd-big .hk-cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 78px;
  padding: 10px 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.16); font-size: 0.8rem; }
.hk-cd-big .hk-cd-unit b { font-size: 2rem; line-height: 1.1; }
.hk-coming-steps { margin: 0; padding-left: 20px; line-height: 1.6; }
.hk-coming-steps li { margin-bottom: 8px; }
.hk-ready { border-left: 4px solid var(--success, #27ae60); }
.hk-notready { border-left: 4px solid var(--warning); }
@media (max-width: 768px) {
  .hk-teaser { justify-content: center; text-align: center; padding: 10px; }
  .hk-teaser-more { margin-left: 0; }
  .hk-cd { gap: 4px; flex-wrap: nowrap; }
  .hk-cd-unit { padding: 2px 5px; font-size: 0.78rem; }
  .hk-cd-unit b { font-size: 0.98rem; }
  .hk-cd-big:not([hidden]) { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
  .hk-cd-big .hk-cd-unit { min-width: 0; padding: 8px 2px; font-size: 0.68rem; }
  .hk-cd-big .hk-cd-unit b { font-size: 1.45rem; }
  .hk-hero h1 { font-size: 1.4rem; line-height: 1.25; }
}

/* Kuvien raahaa ja pudota -alue hallinnassa (5.11.2026) */
.hk-drop { margin-top: 12px; border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 22px 16px; text-align: center; cursor: pointer; background: #fafbfc;
  transition: border-color .15s, background .15s; }
.hk-drop:hover, .hk-drop:focus-visible { border-color: var(--accent); outline: none; }
.hk-drop.is-over { border-color: var(--accent); background: #eef6ff; }
.hk-drop.is-busy { cursor: progress; }
.hk-drop-icon { font-size: 1.8rem; line-height: 1; color: var(--accent); margin-bottom: 6px; }
.hk-drop-progress { height: 6px; background: var(--bg-hover); border-radius: 3px;
  overflow: hidden; margin: 12px auto 0; max-width: 360px; }
.hk-drop-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.hk-drop-status { margin-top: 8px; font-size: 0.9rem; min-height: 1.2em; }
.hk-drop-status.is-ok { color: #1e8449; }
.hk-drop-status.is-warn { color: #8a5300; }
.hk-drop-status.is-error { color: var(--danger); }
