/* HK Reisipakkumised — new architecture (CONTRACT.md §5). Pages are static HTML fragments baked
 * by the Python renderer (hetked tokens + the site's own existing .rz/.chips/.fd-* CSS already
 * ship there — never duplicated here). This file carries ONLY the plugin's own NEW UI: the two
 * lead forms, the empty/expired state, and the shared gallery/pagination/pills classes the
 * renderer's fragment HTML expects to find on the page (CONTRACT.md §3a). Every class here is
 * `.hkrp-` prefixed, built only from the documented hetked tokens — teal #0f766e (hover #0d9488),
 * text #111827, greys #6b7280 / #9ca3af, borders #e5e7eb / #f3f4f6, card radius 12px + shadow
 * 0 1px 3px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.03), pill radius 999px, row/button radius 8px.
 * No :has() (FB in-app browser is ~90% of hetked traffic). No emoji. Tap targets >= 44px.
 */

.hkrp-wide, .hkrp-leadform, .hkrp-mini, .hkrp-empty {
	font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
	color: #111827; box-sizing: border-box;
}
.hkrp-wide *, .hkrp-leadform *, .hkrp-mini * { box-sizing: border-box; max-width: 100%; }

/* --- lead form card + fields (mirrors design_pack/mockups/hkrp.css Part B "hkrp-card") --- */
.hkrp-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.03); padding: 20px; }
.hkrp-card-title { font-size: 17px; font-weight: 800; color: #111827; margin: 0 0 6px; line-height: 1.3; }
.hkrp-card-text { font-size: 14px; line-height: 1.5; color: #6b7280; margin: 0 0 16px; }

.hkrp-field { margin-bottom: 12px; }
.hkrp-field label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.hkrp-field label .req { color: #0f766e; }
.hkrp-field select, .hkrp-field input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; color: #111827; background: #fff; font-family: inherit; }
.hkrp-field select:focus, .hkrp-field input:focus { outline: 2px solid #0f766e; outline-offset: 1px; border-color: #0f766e; }
.hkrp-field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .hkrp-field-2 { grid-template-columns: 1fr; } }
.hkrp-static { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border: 1px solid #f3f4f6; border-radius: 8px; background: #f9fafb; font-size: 14px; color: #6b7280; font-weight: 600; }
.hkrp-static[data-hkrp-offer-summary] { flex-direction: column; align-items: flex-start; gap: 2px; height: auto; padding: 10px 12px; }
body a.hkrp-changedate { display: inline-block; margin: 6px 0 14px; font-size: 12.5px; font-weight: 600; color: #0f766e; text-decoration: none; }
body a.hkrp-changedate:hover { color: #0d9488; }

.hkrp-btn-pri, a.hkrp-btn-pri, .entry-content a.hkrp-btn-pri {
	display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box;
	min-height: 44px; padding: 12px 14px; border: none; border-radius: 8px; background: #0f766e;
	color: #fff !important; font-size: 15px; font-weight: 700; text-decoration: none !important;
	cursor: pointer; margin-top: 4px;
}
.hkrp-btn-pri:hover, a.hkrp-btn-pri:hover { background: #0d9488; }
.hkrp-btn-pri:disabled, .hkrp-btn-pri--disabled { opacity: .55; cursor: default; }

/* collapsible "Rohkem eelistusi (valikuline)" */
.hkrp-more { border-top: 1px solid #f3f4f6; margin-top: 12px; padding-top: 2px; }
.hkrp-more summary { list-style: none; cursor: pointer; padding: 10px 2px; font-size: 13.5px; font-weight: 700; color: #0f766e; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.hkrp-more summary::-webkit-details-marker { display: none; }
.hkrp-more[open] summary .hkrp-chev { transform: rotate(180deg); }
.hkrp-chev { transition: transform .2s ease; }
.hkrp-more-body { padding: 2px 0 10px; }

.hkrp-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.hkrp-privacy { font-size: 12px; color: #9ca3af; margin: 4px 0 12px; line-height: 1.5; }
.hkrp-formmsg { font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.hkrp-formmsg.hkrp-formmsg-ok { color: #0f766e; }
.hkrp-formmsg.hkrp-formmsg-err { color: #b91c1c; }

.hkrp-disclosure { font-size: 12.5px; color: #9ca3af; line-height: 1.5; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f3f4f6; }
.hkrp-disclosure strong { color: #6b7280; font-weight: 600; }

.hkrp-empty { padding: 26px 0 8px; margin: 0; text-align: left; color: #111827; font-size: 19px; font-weight: 700; }
.hkrp-backlinks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px; }
body a.hkrp-back { color: #0f766e; font-size: 14px; font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
body a.hkrp-back:hover { color: #0d9488; }

/* --- gallery (hotel fragment; CONTRACT.md §3a) --- */
.hkrp-gallery { position: relative; width: 100%; aspect-ratio: 3/2; border-radius: 10px; overflow: hidden; background: #eef1f4; }
.hkrp-gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hkrp-counter { position: absolute; bottom: 12px; right: 12px; z-index: 2; background: rgba(17,24,39,.72); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; line-height: 1; }
.hkrp-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 22px 4px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.hkrp-thumbs::-webkit-scrollbar { display: none; }
/* Thumbs are wrapped in <a>: the anchor is the flex item, so it must not shrink either. */
.hkrp-thumbs > a { display: block; flex: 0 0 auto; line-height: 0; }
body .hkrp-thumbs img { display: block; flex: 0 0 auto; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; scroll-snap-align: start; }
body .hkrp-thumbs img.cur { border-color: #0f766e; }

/* price caveat next to a board row's meal tag — drop it on very narrow phones so the row never
   forces horizontal scroll (renderer's board rows carry `.hkrp-mealtag`). */
@media (max-width: 420px) { .hkrp-mealtag { display: none; } }

/* --- pagination (category fragment) --- */
.hkrp-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 22px 0 6px; flex-wrap: wrap; }
.entry-content .hkrp-pagination a, .hkrp-pagination span { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #374151 !important; text-decoration: none !important; border: 1px solid #e5e7eb; background: #fff; }
.entry-content .hkrp-pagination a:hover { border-color: #0f766e; color: #0f766e !important; }
.entry-content .hkrp-pagination a.cur, .hkrp-pagination .cur { background: #0f766e; border-color: #0f766e; color: #fff !important; }

/* --- pills-as-links ("Küsi pakkumist"/"Vaata hotelli" on .rz cards — the .rz-btn base rules ship
   with the site's own CSS; this only beats the site-wide ".entry-content a{color:blue}" rule) --- */
.entry-content a.rz-btn { color: #0f766e; text-decoration: none !important; }
.entry-content a.rz-btn.pri { color: #fff !important; }
.entry-content a.hkrp-more-btn { color: #0f766e; text-decoration: none !important; }

/* --- mini shortcode: [hk_reisiparing_mini] restyled to hetked tokens --- */
.hkrp-mini { background: #f0fdfa; }
.hkrp-mini .hkrp-field-2 { margin-bottom: 12px; }
@media (min-width: 700px) {
	.hkrp-mini .hkrp-field-2 { grid-template-columns: 1fr 1fr; align-items: flex-end; }
	.hkrp-mini .hkrp-btn-pri { width: auto; padding-left: 28px; padding-right: 28px; }
}
