/* CLIK.ma round 108: « Estimer ma voiture / mon bien » and the price guides (clik_estimer.tpl, clik_prix.tpl) - their own
   parts over the status pages' layout (css/clik-pay.css .clik-pst-, its --cp- colours, day and night). The 8 px grid:
   fields, chips, tiles and cards 8 px apart, 16 px inside the cards (8 on phones). Logical sides: Arabic mirrored. */
.clik-est-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .86); }
.clik-est-crumbs a { color: #fff !important; text-decoration: none; }
.clik-est-crumbs a:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .clik-est .clik-pst-acts { flex-wrap: nowrap; }
  .clik-est .clik-pst-acts > .clik-pst-btn { flex: none; white-space: nowrap; }
}

/* the form */
.clik-est-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.clik-est-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .clik-est-two { grid-template-columns: minmax(0, 1fr); } }
.clik-est-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; font-size: 13px; font-weight: 700; color: var(--cp-ink); }
.clik-est-f small { font-weight: 500; color: var(--cp-mute); }
.clik-est-f select, .clik-est-f input { box-sizing: border-box; width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--cp-edge); border-radius: 10px; background: var(--cp-field); color: var(--cp-ink); font: inherit; font-size: 15px; font-weight: 500; }
.clik-est-f select:focus, .clik-est-f input:focus { outline: 2px solid var(--cp-blue); outline-offset: 1px; border-color: var(--cp-blue); }
.clik-est-f select:disabled { opacity: .55; }
.clik-est-g { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.clik-est-g legend { float: none; width: auto; margin: 0 0 4px; padding: 0; font-size: 13px; font-weight: 700; color: var(--cp-ink); }
.clik-est-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.clik-est-chips.is-two > * { flex: 1 1 0; }
.clik-est-chip { position: relative; flex: 1 1 auto; display: flex; margin: 0; cursor: pointer; }
.clik-est-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.clik-est-chip span { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--cp-soft); color: var(--cp-ink); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.clik-est-chip input:checked + span { background: var(--cp-blue); color: #fff; }
.clik-est-chip input:focus-visible + span { outline: 2px solid var(--cp-blue); outline-offset: 2px; }
.clik-est-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin: 0; border: 0; border-radius: 12px; background: linear-gradient(135deg, #2f7bff, #0a4dff); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.clik-est-go:hover { filter: brightness(1.05); }
.clik-est-go:active { transform: scale(.98); }
.clik-est-note, .clik-est-txt { font-size: 13px; line-height: 1.5; color: var(--cp-mute); }

/* the answer */
.clik-est-res.is-ok { border: 1px solid color-mix(in srgb, var(--cp-blue) 25%, transparent); }
.clik-est-res:focus { outline: none; }
.clik-est-big { font-size: clamp(20px, 6.4vw, 34px); font-weight: 900; line-height: 1.15; color: var(--cp-ink); }
.clik-est-big bdi { unicode-bidi: isolate; white-space: nowrap; }
.clik-est-bar { position: relative; height: 10px; border-radius: 6px; background: var(--cp-soft); }
.clik-est-band { position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(90deg, #7ab0ff, #0866FF 50%, #7ab0ff); opacity: .85; }
.clik-est-dot { position: absolute; top: 50%; inset-inline-start: var(--p, 50%); width: 18px; height: 18px; margin-inline-start: -9px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid #0866FF; box-sizing: border-box; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
[dir="rtl"] .clik-est-band { background: linear-gradient(270deg, #7ab0ff, #0866FF 50%, #7ab0ff); }
.clik-est-mid { font-size: 15px; color: var(--cp-ink); }
.clik-est-mid b { color: var(--cp-blue); font-weight: 800; }
.clik-est-sure { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; min-height: 28px; padding: 4px 12px; border-radius: 14px; background: #FEF3C7; color: #92400E; font-size: 13px; font-weight: 700; }
.clik-est-sure.is-sure { background: #DCFCE7; color: #166534; }
body.night-mode .clik-est-sure { background: #3b3222; color: #fbbf24; }
body.night-mode .clik-est-sure.is-sure { background: #16301f; color: #4ade80; }
.clik-est-wide { font-size: 13px; color: var(--cp-mute); }
.clik-est-acts { display: flex; flex-wrap: wrap; gap: 8px; }
/* phones: the buttons share their rows - every row ends level */
@media (max-width: 600px) { .clik-est-acts > * { flex: 1 1 auto; justify-content: center; } }
.clik-est-pub { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: #16A34A; color: #fff !important; font: inherit; font-size: 14px; font-weight: 800; text-decoration: none !important; cursor: pointer; }
.clik-est-pub:hover { filter: brightness(1.06); }
.clik-est-link { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--cp-soft); color: var(--cp-ink) !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }
.clik-est-link:hover { background: #E7F0FF; color: #0866FF !important; }
body.night-mode .clik-est-link:hover { background: #263951; color: #4C9AFF !important; }
.clik-est-none { font-size: 15px; line-height: 1.5; color: var(--cp-ink); }

/* chips of makes / cities */
.clik-est-chiplist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.clik-est-chiplist > li { flex: 1 1 auto; display: flex; }
.clik-est-chiplist a { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--cp-soft); color: var(--cp-ink) !important; font-size: 14px; text-decoration: none !important; white-space: nowrap; }
.clik-est-chiplist a b { font-weight: 700; }
.clik-est-chiplist a span { font-size: 12px; font-weight: 600; color: var(--cp-mute); }
.clik-est-chiplist a:hover, .clik-est-chiplist a:focus-visible { background: #E7F0FF; color: #0866FF !important; }
body.night-mode .clik-est-chiplist a:hover, body.night-mode .clik-est-chiplist a:focus-visible { background: #263951; color: #4C9AFF !important; }

/* tiles and tables of the guides */
.clik-est-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.clik-est-tiles > div { flex: 1 1 150px; min-width: 0; }
.clik-est-tiles > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--cp-tint); }
.clik-est-tiles small { font-size: 12.5px; font-weight: 600; color: var(--cp-mute); }
.clik-est-tiles b { font-size: 18px; font-weight: 800; color: var(--cp-ink); }
.clik-est-tw { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.clik-est-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.clik-est-t th { padding: 8px; text-align: start; font-size: 12.5px; font-weight: 700; color: var(--cp-mute); border-bottom: 1px solid var(--cp-line); white-space: nowrap; }
.clik-est-t td { padding: 8px; border-bottom: 1px solid var(--cp-line); color: var(--cp-ink); white-space: nowrap; }
.clik-est-t tr:last-child td { border-bottom: 0; }
.clik-est-t td a { color: var(--cp-blue) !important; font-weight: 700; text-decoration: none; }
.clik-est-t td a:hover { text-decoration: underline; }
.clik-est-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-inline-start: 4px; border-radius: 10px; background: var(--cp-soft); color: var(--cp-mute); font-size: 11.5px; font-weight: 700; }
.clik-est-tag.is-rent { background: #EDE9FE; color: #6D28D9; }
body.night-mode .clik-est-tag.is-rent { background: #2e2552; color: #c4b5fd; }

/* the listings' cards */
/* six cards at most: one row of six on a wide card, two rows of three, three rows of two on a phone - the rows end level */
.clik-est-cw { container-type: inline-size; width: 100%; min-width: 0; }
.clik-est-cards > li { min-width: 0; }
.clik-est-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@container (max-width: 880px) {
  .clik-est-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clik-est-cards.is-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clik-est-cards.is-n5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .clik-est-cards.is-n5 > li { grid-column: span 2; }
  .clik-est-cards.is-n5 > li:nth-child(n+4) { grid-column: span 3; }
}
@container (max-width: 460px) {
  .clik-est-cards, .clik-est-cards.is-n4, .clik-est-cards.is-n5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clik-est-cards.is-n5 > li, .clik-est-cards.is-n5 > li:nth-child(n+4) { grid-column: auto; }
  /* an odd last card takes the whole row, its photo beside its words */
  .clik-est-cards > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .clik-est-cards > li:last-child:nth-child(odd) .clik-est-cd { flex-direction: row; }
  .clik-est-cards > li:last-child:nth-child(odd) .clik-est-cd-ph { flex: 0 0 50%; }
  .clik-est-cards > li:last-child:nth-child(odd) .clik-est-cd-w { justify-content: center; }
}
.clik-est-cd { display: flex; flex-direction: column; height: 100%; border-radius: 12px; overflow: hidden; background: var(--cp-soft); color: var(--cp-ink) !important; text-decoration: none !important; transition: transform .15s ease; }
.clik-est-cd:hover { transform: translateY(-2px); }
.clik-est-cd-ph { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--cp-line); }
.clik-est-cd-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clik-est-cd-sold { position: absolute; top: 8px; inset-inline-start: 8px; padding: 2px 8px; border-radius: 10px; background: #DC2626; color: #fff; font-size: 11.5px; font-weight: 800; font-style: normal; }
.clik-est-cd-w { display: flex; flex-direction: column; gap: 2px; padding: 8px; min-width: 0; }
.clik-est-cd-p { font-size: 15px; font-weight: 800; }
.clik-est-cd-t { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clik-est-cd-w small { font-size: 12px; color: var(--cp-mute); }

@media (max-width: 767px) {
  .clik-est .clik-pst-card { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .clik-est-cd, .clik-est-chip span { transition: none; } .clik-est-cd:hover { transform: none; } }
