/*
 * Favorites /obrane/ and compare /porivniannia/ (design: compare.jsx). Loaded only there, after catalog.css.
 * Brand (TQ): the best values are marked with the decorative cypress wash — yellow stays for clickable things.
 */

.ev-shortlist__head { display: grid; gap: 12px; margin-bottom: 20px; }
.ev-shortlist__head .ev-catalog__title { margin-bottom: 0; }
.ev-shortlist__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-shortlist__note { margin: 0 0 16px; font-size: 13px; color: var(--ev-ink-3); }
.ev-shortlist__adopt {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 20px; padding: 16px 18px; border-radius: var(--ev-radius-md); background: var(--ev-cypress-wash);
}
.ev-shortlist__adopt[hidden] { display: none; }
.ev-shortlist__adopt p { margin: 0; font-weight: 600; }
.ev-empty__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }

@media (min-width: 1024px) {
  .ev-shortlist__head { grid-template-columns: 1fr auto; align-items: end; }
}

/* Compare head */
.ev-compare__lead { max-width: 620px; margin: 12px 0 0; color: var(--ev-ink-2); }
.ev-compare__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ev-compare__count { margin: 0; color: var(--ev-ink-3); font-weight: 600; }
.ev-compare__count strong { font-size: 28px; color: var(--ev-ink); }

.ev-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ev-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ev-switch__track { position: relative; width: 38px; height: 22px; border-radius: var(--ev-radius-pill); background: var(--ev-line-strong); transition: background 0.15s; }
.ev-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ev-ink); transition: transform 0.15s;
}
.ev-switch input:checked + .ev-switch__track { background: var(--ev-yellow); }
.ev-switch input:checked + .ev-switch__track::after { transform: translateX(16px); }
.ev-switch input:focus-visible + .ev-switch__track { outline: 2px solid var(--ev-ink); outline-offset: 2px; }

/* Table: label column sticks while the properties scroll sideways on small screens */
.ev-compare__scroll { overflow-x: auto; margin-top: 8px; padding-bottom: 8px; }
.ev-compare__scroll:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 4px; }
.ev-compare__table {
  width: 100%; min-width: calc(130px + var(--ev-cols, 2) * 190px);
  border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px;
}
.ev-compare__table th, .ev-compare__table td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ev-line); }
.ev-compare__table th[scope="row"], .ev-compare__corner {
  position: sticky; left: 0; z-index: 1; width: 130px; padding-left: 0; background: var(--ev-bg); font-weight: 600;
}
.ev-compare__table thead th, .ev-compare__table thead td { padding: 0 6px 12px; border-bottom: 0; font-weight: 500; }
.ev-compare__hint { display: block; margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ev-cypress-deep); }
.ev-compare__group th {
  padding: 28px 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ev-cypress-deep); border-bottom: 2px solid var(--ev-cypress);
}
.ev-compare__table td.is-best { background: var(--ev-cypress-wash); font-weight: 700; }
.ev-compare__none { color: var(--ev-ink-4); }
.ev-compare__table.is-diff tr[data-same] { display: none; }
.ev-compare__agent { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.ev-compare__actions td { border-bottom: 0; }
.ev-compare__actions .ev-btn { width: 100%; white-space: normal; text-align: center; }
.ev-compare__actions .ev-btn + .ev-btn { margin-top: 6px; }

@media (min-width: 1024px) {
  .ev-compare__table th[scope="row"], .ev-compare__corner { width: 180px; }
  .ev-compare__table { min-width: calc(180px + var(--ev-cols, 2) * 200px); }
}

/* Property head card in the table */
.ev-ccard {
  position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--ev-surface); border-radius: var(--ev-radius-md); box-shadow: var(--ev-shadow-sm);
}
.ev-ccard__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ev-cypress-wash); }
.ev-ccard__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ev-ccard__remove {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--ev-surface); color: var(--ev-ink);
  box-shadow: var(--ev-shadow-md); cursor: pointer;
}
.ev-ccard__remove[hidden] { display: none; }
.ev-ccard__remove:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.ev-ccard__price { margin: 12px 12px 0; font-size: 20px; font-weight: 700; line-height: 1.1; }
.ev-ccard__title { margin: 6px 12px 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ev-ink); text-decoration: none; }
.ev-ccard__title:hover { text-decoration: underline; }
.ev-ccard__loc { display: flex; align-items: center; gap: 4px; margin: auto 12px 12px; padding-top: 8px; font-size: 12px; color: var(--ev-ink-3); }
.ev-ccard--add {
  align-items: center; justify-content: center; gap: 10px; min-height: 220px; padding: 18px;
  background: transparent; border: 1.5px dashed var(--ev-line-strong); box-shadow: none;
  font-size: 13px; font-weight: 600; text-align: center; color: var(--ev-ink-2); text-decoration: none;
}
.ev-ccard__plus {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ev-cypress-wash); color: var(--ev-cypress-deep); font-size: 28px; font-weight: 300; line-height: 1;
}

/* One-day tour request — cypress wash is decorative */
.ev-compare__tour {
  display: grid; gap: 20px; margin-top: 40px; padding: 24px; border-radius: var(--ev-radius-lg); background: var(--ev-cypress-wash);
}
.ev-compare__tour-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; line-height: 1.2; }
.ev-compare__tour p { margin: 0; color: var(--ev-ink-2); }
@media (min-width: 1024px) {
  .ev-compare__tour { grid-template-columns: 1fr 1.1fr; align-items: start; padding: 36px; }
}

@media print {
  .ev-header, .ev-footer, .ev-cookie, .ev-toast, .ev-crumbs, .ev-compare__controls, .ev-compare__tour,
  .ev-ccard__remove, .ev-ccard--add, .ev-compare__actions, .ev-shortlist__adopt { display: none !important; }
  .ev-compare__scroll { overflow: visible; }
  .ev-compare__table { min-width: 0; font-size: 11px; }
  .ev-compare__table th[scope="row"], .ev-compare__corner { position: static; }
  body { background: #fff; }
}
