/* CaddyLuck UX fixes (final stage). Loaded after the theme styles. */

/* 1. Card gallery: until Swiper is initialised (slow JS, errors, old browsers) the slides were ~7px "stripes".
      Show the first photo at full width instead. */
.card-slider:not(.swiper-initialized) { overflow: hidden; }
.card-slider:not(.swiper-initialized) .swiper-wrapper { display: flex; }
.card-slider:not(.swiper-initialized) .swiper-slide { flex: 0 0 100%; width: 100%; max-width: 100%; }
.card-slider .swiper-slide .card-slide { width: 100%; background-size: cover; background-position: center; }
/* Many photos → dynamic bullets (set in ux.js); keep the row inside the photo. */
.card-slider .swiper-pagination { overflow: hidden; white-space: nowrap; }

/* 2. Card title — one line with ellipsis, full text in the title attribute. */
.card__head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.card__title { flex: 1 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover, .card__title a:focus-visible { text-decoration: underline; }
.card__time { flex: 0 0 auto; white-space: nowrap; }

/* 3. Meta row: stable layout, long auction name truncated, "Сайт донор" never wraps alone. */
.card__line { min-width: 0; }
.card__details { min-width: 0; }
.card__details:not(.card__details--identity) { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 14px; overflow: hidden; }
.card__details:not(.card__details--identity) > * { flex: 0 0 auto; white-space: nowrap; }
.card__details-col { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto !important; overflow: hidden; }
.card__details-col .info-tooltip { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.card__details-col .info-tooltip__title { min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__details .donor { flex: 0 0 auto; white-space: nowrap; }
.dropdown__btn--seller span { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 767.98px) {
	.card__details:not(.card__details--identity) { flex-wrap: wrap; overflow: visible; }
	.card__details-col { flex: 1 1 100% !important; }
	.dropdown__btn--seller span { max-width: 150px; }
}

/* 4. Photo is a link to the car page. */
.card__slider .card-slide { cursor: pointer; }

/* 7. Modals: visible close button, same everywhere. */
.cl-modal-close {
	position: absolute; top: 12px; right: 12px; z-index: 5;
	width: 40px; height: 40px; border: 0; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: rgba(17, 24, 39, .06); color: #111827; cursor: pointer;
	transition: background .15s;
}
.cl-modal-close:hover { background: rgba(17, 24, 39, .14); }
.cl-modal-close:focus-visible { outline: 2px solid #2f55d4; outline-offset: 2px; }
.cl-modal-close svg { width: 18px; height: 18px; }
.fancybox__content { position: relative; }
.fancybox__content > .is-close-btn { display: none !important; } /* replaced by .cl-modal-close */
.card__details-col .card__info-accent { margin-right: 8px; white-space: nowrap; }

/* 6. Registration message. */
.cl-notice { position: fixed; z-index: 99990; left: 50%; top: 24px; transform: translateX(-50%); width: min(560px, calc(100% - 32px));
	padding: 16px 44px 16px 18px; border-radius: 12px; background: #eaf7ee; border: 1px solid #7cc493; color: #12381f;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-size: 15px; line-height: 1.45; }
.cl-notice strong { display: block; margin-bottom: 4px; }
.cl-notice__close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; background: transparent; font-size: 24px; line-height: 1; color: #12381f; cursor: pointer; }

/* 8. WCAG AA contrast: low-contrast greys (#bcb8bb 1.8–2.0:1, #797779 4.44:1) on light backgrounds,
   selectors taken from the theme CSS where axe-core reported failures. Generated by tests/tools/gen-contrast-css.py */
.custom-checkbox.light .custom-checkbox__label,
.custom-checkbox--border .custom-checkbox__label,
.custom-checkbox--no-border .custom-checkbox__label,
.product-tabs__title,
.detail-info__name,
.car-lot__item,
.contact-item__label { color: #686668; }
.pagination__text,
.card-detail__name,
.button-outline,
.button-outline.disabled,
.button-outline:disabled,
.result-counter__text,
.car-lot__text,
.seller-item__text,
.rating-block__feedback,
.landing-form__text,
.blog-card__date,
.rent-item__title { color: #6d6a6c; }
/* manual: elements without own class (axe targets) */
.filter-toggler__label > span,
.review__head-title > span,
.no-review__text > p,
.card-price__item,
.card-price__item--lg,
.card-price__item--sm { color: #6d6a6c; }
.cars-slide__crumbs-list > li,
.office-block__item > a[href^="tel:"],
.office-block__item > a[href^="mailto:"] { color: #686668; }
.cl-countdown__label { opacity: 1; color: #5b595b; }
.card__input > span,
.blog-card__text p { color: #6d6a6c; }
.database-car .custom-checkbox.dark .custom-checkbox__label { color: #686668; }
/* Text over photos (hero): white + shadow, e.g. «Потрібно увійти» was dark grey on a dark photo. */
.account__hero .account__title { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .35); }
/* 9. Auction dates without data: one neutral dash, no icon. */
.cl-date-empty { color: #686668; padding-left: 0 !important; }
.cl-date-empty::before, .cl-date-empty::after { content: none !important; display: none !important; }
/* 10. Footer navigation: plain vertical list, fixed 10px gap, no stretching (any number of items). */
.footer-landing__menu, .footer__menu {
	display: flex !important; flex-direction: column; flex-wrap: nowrap;
	justify-content: flex-start !important; align-items: flex-start; align-content: flex-start;
	align-self: flex-start; gap: 10px; height: auto !important; min-height: 0 !important; margin-top: 0;
}
.footer-landing__menu > li, .footer__menu > li { flex: 0 0 auto !important; height: auto !important; margin: 0 !important; padding: 0; }
/* 11. «Виникли запитання?»: the message field looks like the other fields; balanced two-column layout. */
.questions .questions__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px; align-items: center; }
.questions .questions__col { align-self: center; }
.questions .questions__text { margin-top: 8px; font-size: 16px; line-height: 1.5; }
.questions .questions-form__field textarea,
.questions .questions-form__input {
	display: block; width: 100%; min-height: 140px; resize: vertical; box-sizing: border-box;
	padding: 14px 16px; border: 1px solid #dcdadb; border-radius: 12px; background: #fafafa;
	font: inherit; font-size: 16px; line-height: 1.45; color: #1f1d1e;
}
.questions .questions-form__input::placeholder { color: #6d6a6c; opacity: 1; }
.questions .questions-form__input:focus { outline: none; border-color: #2f55d4; box-shadow: 0 0 0 3px rgba(47, 85, 212, .15); background: #fff; }
.questions .questions-form__field p { margin: 0; }
.questions .caddyluck-live-recaptcha { margin-left: 0 !important; }
@media (max-width: 767.98px) {
	.questions .questions__inner { grid-template-columns: 1fr; gap: 16px; }
}
.questions .questions-form__input { height: auto !important; min-height: 130px !important; }
.questions .questions__form { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
.questions .questions__form .wpcf7, .questions .questions__form form { max-width: 100%; box-sizing: border-box; }
#product-questions textarea.questions-form__input { height: auto !important; min-height: 130px !important; }
#product-questions .questions__form { width: auto !important; max-width: 100% !important; min-width: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
@media (max-width: 767.98px) {
	#product-questions .questions__inner { grid-template-columns: minmax(0, 1fr) !important; }
	#product-questions .caddyluck-live-recaptcha { max-width: 100%; overflow: hidden; }
}
@media (max-width: 359.98px) {
	#product-questions .caddyluck-live-recaptcha .g-recaptcha { transform: scale(.9); }
}
/* Q11: landing links (catalog / cards). */
.cl-landing-links { max-width: 1340px; margin: 32px auto; padding: 0 16px; box-sizing: border-box; }
.cl-landing-links__title { margin: 0 0 12px; font-size: 20px; line-height: 1.3; }
.cl-landing-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.cl-landing-links li a { display: inline-block; padding: 6px 12px; border: 1px solid #dcdadb; border-radius: 999px; color: #1f1d1e; text-decoration: none; font-size: 14px; }
.cl-landing-links li a:hover, .cl-landing-links li a:focus-visible { border-color: #2f55d4; color: #2f55d4; }
.cl-landing-links li span { color: #686668; font-size: 13px; margin-left: 2px; }

/* ===== Round 2 / item 1: galleries — stable size from the first frame, no stripes before Swiper initialises ===== */
/* Catalog cards: photo is an <img> (lazy except the first cards) filling the fixed-height slide. */
.card-slide { position: relative; overflow: hidden; }
.card-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Big gallery on the car page. FINAL3: before Swiper — only the 1st photo, full width (the rest hidden). */
.product-slider:not(.swiper-initialized) { overflow: hidden; }
.product-slider:not(.swiper-initialized) .swiper-wrapper { display: flex; }
.product-slider:not(.swiper-initialized) .product-slide { flex: 0 0 100%; width: 100%; }
.product-slider:not(.swiper-initialized) .swiper-slide:not(:first-child),
.card-slider:not(.swiper-initialized) .swiper-slide:not(:first-child),
.cars-slides:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
.product-slider .product-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* «Схожі авто»: 1.1 / 2.2 / 4 cards (gap 12px); inner photo sliders 1 photo, 4:3. */
.cars-slider__slider:not(.swiper-initialized) { overflow: hidden; }
.cars-slider__slider:not(.swiper-initialized) > .swiper-wrapper { display: flex; }
.cars-slider__slider:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide { flex: 0 0 calc(100% / 1.1 - 12px); margin-right: 12px; }
@media (min-width: 768px) { .cars-slider__slider:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide { flex-basis: calc(100% / 2.2 - 12px); } }
@media (min-width: 1200px) { .cars-slider__slider:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide { flex-basis: calc((100% - 36px) / 4); } }
.cars-slides:not(.swiper-initialized) { overflow: hidden; }
.cars-slides:not(.swiper-initialized) .swiper-wrapper { display: flex; }
.cars-slides:not(.swiper-initialized) .swiper-slide { flex: 0 0 100%; width: 100%; }
.cars-slides__img { aspect-ratio: 4 / 3; overflow: hidden; }
.cars-slides__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Round 2 / item 2: lot number always fully visible (grid, mobile); icon after it; truncate date/auction ===== */
.card__details-col { display: flex !important; align-items: center; flex-wrap: nowrap !important; min-width: 0; }
.card__details-col .card__info-accent { order: 0; flex: 0 0 auto !important; min-width: max-content; max-width: none !important; overflow: visible !important; text-overflow: clip !important; white-space: nowrap; margin-right: 6px; }
.card__details-col .info-tooltip { order: 1; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.card__details-col .info-tooltip__label { order: 0; flex: 0 0 auto; position: static !important; margin: 0 !important; }
.card__details-col .info-tooltip__title { order: 1; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-tooltip__title.cl-lot-row { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.info-tooltip__title.cl-lot-row > .card__info-accent { flex: 0 0 auto; min-width: max-content; }
.info-tooltip__title.cl-lot-row > .info-tooltip__label { flex: 0 0 auto; position: static !important; margin: 0 !important; }
.info-tooltip__title.cl-lot-row > .cl-lot-rest { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Round 2 / item 3: bid hint under the EUR field ===== */
.cl-bid-hint { margin: 6px 2px 10px; font-size: 13px; line-height: 1.3; color: #5b595b; }

/* ===== Round 2 / item 4: account section headings dark on the white panel (the hero title above stays white) ===== */
.account__hero .account__tab > .account-body .account-body__title { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .35); }
.account .tabs .account-body__title { color: #1d1b1d !important; text-shadow: none !important; }

/* ===== Round 2 / item 5: "inverted corner" decor of .landing-filter__actions bit into the buttons on 404
   (top-right of «Перейти до каталогу», bottom-left of «На головну»). The theme already hides it for this container,
   but a later rule of the same specificity re-enabled it. ===== */
.landing-filter__actions::before, .landing-filter__actions::after { display: none !important; }
/* FINAL3 / F16: "≈ X" in the selected currency under a request amount */
.cl-approx{display:block;margin-top:2px;color:#6b6b6b;font-size:.8em;font-weight:500;line-height:1.2;white-space:nowrap}

/* Photo uploads: shrinking in progress, size error */
.cl-shrinking { opacity: .6; pointer-events: none; position: relative; }
.cl-shrinking[data-cl-busy]::after { content: attr(data-cl-busy); position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 13px; color: #2b3a67; }
.cl-upload-notice { margin: 12px 0; padding: 12px 16px; border-radius: 12px; background: #fdecec; color: #9b1c1c; font-weight: 500; line-height: 1.4; }
.cl-req { color: #d93025; }

/* ===== F3-7: «Мої авто» tab ===== */
.cl-mycars__msg { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #eef3ff; color: #1f3a8a; }
.cl-mycars__msg--warn { background: #fdecec; color: #9b1c1c; }
.cl-mycars__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cl-mycars__item { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 12px; border: 1px solid rgba(0,0,0,.08); border-radius: 14px; background: #fff; }
.cl-mycars__photo { width: 160px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #eef0f3; }
.cl-mycars__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-mycars__info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-mycars__title { font-weight: 600; font-size: 1.05em; }
.cl-mycars__title a { color: inherit; }
.cl-mycars__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .92em; color: #5b5b5b; }
.cl-mycars__price { font-weight: 600; color: #1d1b1d; }
.cl-mycars__status { padding: 2px 10px; border-radius: 999px; font-weight: 500; background: #f1f1f1; color: #444; white-space: nowrap; }
.cl-mycars__status--ok { background: #e6f6ec; color: #17663a; }
.cl-mycars__status--wait { background: #fff4dc; color: #8a5a00; }
.cl-mycars__status--bad { background: #fdecec; color: #9b1c1c; }
.cl-mycars__reason { padding: 8px 12px; border-radius: 10px; background: #fdecec; color: #7a1717; font-size: .92em; }
.cl-mycars__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cl-mycars__actions form { margin: 0; }
.cl-mycars__link { margin: 16px 0 0; font-weight: 500; }
@media (max-width: 600px) {
	.cl-mycars__item { grid-template-columns: 1fr; }
	.cl-mycars__photo { width: 100%; }
}

/* F3-7: personal note / hide buttons are for signed-in visitors only (guests get the cached page without "logged-in"). */
body:not(.logged-in) .product-block__btn[data-action="focus-note"],
body:not(.logged-in) .product-block__btn[data-action="clear-note"],
body:not(.logged-in) .product-block__btn:has(form input[name="action"][value="caddyluck_toggle_hidden_vehicle"]),
body:not(.logged-in) form:has(> input[name="action"][value="caddyluck_toggle_hidden_vehicle"]) { display: none !important; }

/* F3-7: add-car success screen */
.cl-addcar-done { max-width: 720px; margin: 32px auto; padding: 28px; border-radius: 18px; background: #f3f6ff; text-align: center; }
.cl-addcar-done__title { margin: 0 0 10px; }
.cl-addcar-done__text { margin: 0 0 18px; color: #4a4a4a; }
.cl-addcar-done__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
button[aria-busy="true"] { opacity: .7; cursor: progress; }
/* «Мої авто»: the theme limits account blocks to 25rem — the list uses the full tab width; compact buttons. */
.account-body__block:has(> .cl-mycars) { max-width: none; width: 100%; display: flex; }
.cl-mycars { width: 100%; }
.cl-mycars__actions .button, .cl-mycars__actions .secondary-button { min-height: 0; height: auto; padding: .55rem 1rem; font-size: .9rem; line-height: 1.2; border-radius: .75rem; width: auto; }
.cl-mycars__actions .button--outline { background: #fff; color: #2b53d6; box-shadow: inset 0 0 0 1px #2b53d6; }
.cl-addcar-done__title { font-size: 1.6rem; font-weight: 600; line-height: 1.25; color: #1d1b1d; }

/* ===== F22: sold dealer car ===== */
.cl-sold-badge { margin: 12px 16px; padding: 12px 16px; border-radius: 12px; background: #fdecec; color: #7a1717; font-size: 1rem; line-height: 1.4; }
.cl-sold-badge strong { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; background: #c62828; color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.cl-sold-badge--placed { margin: 0 0 16px; }
.cl-car-sold form[data-legacy-bid-form], .cl-car-sold .card__form, .cl-car-sold .card__input, .cl-car-sold [data-legacy-bid-form], .cl-car-sold a[href*="auth_modal=login"]:has(.card__btn) { display: none !important; }
.cl-mycars__sold { padding: 6px 12px; border-radius: 10px; background: #f1f1f1; color: #444; font-size: .92em; }
/* UX-consent: the consent checkbox under the landing / contact forms takes the full width of the form (the theme limited
   it to 18.8125rem from 768px — a long text became a narrow 3-line column). */
.landing-form__bottom label.custom-checkbox { max-width: none; width: 100%; }
