/* Cateromedia Core: front (Etap 1) */

/* C2: blok opinii JetReviews ukryty, dopóki Vue nie zamontuje widgetu (front.js dodaje .cm-ready). */
.elementor-widget-jet-reviews-advanced:not(.cm-ready) .jet-reviews-advanced {
	visibility: hidden;
}

.cm-reviews-unavailable {
	padding: 16px 0;
	color: #555;
	font-style: italic;
}

/* C3: gwiazdki przy cateringu bez opinii → „Brak opinii”. */
.cm-no-reviews .elementor-star-rating__wrapper {
	display: none;
}

.cm-no-reviews .elementor-widget-container::after {
	content: "Brak opinii";
	font-size: 0.9em;
	color: #6b6b6b;
}

/* C8: lista miast. */
.cm-lista-miast {
	columns: 4 180px;
	column-gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cm-lista-miast li {
	break-inside: avoid;
	margin: 0 0 4px;
}

.cm-lista-miast__count {
	color: #6b6b6b;
	font-size: 0.9em;
}

/* Etap 4: opinie zewnętrzne (Dietly, Google). Mobile first. */
.cm-stars { position: relative; display: inline-block; width: 5.4em; height: 1em; line-height: 1; vertical-align: -0.1em; font-size: 1em; }
.cm-stars::before, .cm-stars__fill::before { content: "\2605\2605\2605\2605\2605"; position: absolute; left: 0; top: 0; letter-spacing: 0.08em; }
.cm-stars::before { color: #d6d9dd; }
.cm-stars__fill { position: absolute; left: 0; top: 0; height: 100%; overflow: hidden; white-space: nowrap; }
.cm-stars__fill::before { color: #f2b01e; }
.cm-ext-reviews { margin: 0 0 24px; }
.cm-ext-reviews__title { margin: 0 0 12px; }
.cm-ext-reviews__summary { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid #e3e6ea; border-radius: 10px; background: #fff; margin-bottom: 16px; }
.cm-ext-reviews__avg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cm-ext-reviews__score { font-size: 2.4em; font-weight: 700; line-height: 1; }
.cm-ext-reviews__avg .cm-stars { font-size: 1.3em; }
.cm-ext-reviews__count { color: #5f6b76; }
.cm-ext-reviews__sub { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; }
.cm-ext-reviews__sub li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; background: #f4f6f8; border-radius: 6px; font-size: .95em; }
.cm-ext-reviews__rate { margin: 0; font-weight: 600; color: #1f7a4d; }
.cm-ext-reviews__list { list-style: none; margin: 0; padding: 0; }
.cm-ext-review { padding: 14px 0; border-bottom: 1px solid #e3e6ea; }
.cm-ext-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cm-ext-review__rating { font-weight: 600; }
.cm-ext-review__meta { color: #5f6b76; font-size: .9em; margin: 2px 0 6px; }
.cm-ext-review__text { line-height: 1.55; }
.cm-ext-review__reply { margin: 8px 0 0 12px; padding: 8px 12px; border-left: 3px solid #0c2e4b; background: #f4f6f8; font-size: .95em; }
.cm-ext-reviews__more-wrap { text-align: center; margin: 16px 0; }
.cm-ext-reviews__more { padding: 10px 18px; border: 1px solid #0c2e4b; border-radius: 8px; background: #fff; color: #0c2e4b; font-weight: 600; cursor: pointer; }
.cm-ext-reviews__more:disabled { opacity: .6; cursor: wait; }
.cm-ext-reviews__footer { color: #5f6b76; font-size: .9em; }
.cm-ext-rating[data-cm-rating-label] .elementor-star-rating__wrapper { display: inline-flex; }
.cm-ext-rating--single::after, .cm-ext-rating--card::after { content: attr(data-cm-rating-label); display: block; font-size: .85em; color: #5f6b76; margin-top: 2px; }
@media (min-width: 720px) {
	.cm-ext-reviews__summary { flex-direction: row; align-items: center; justify-content: space-between; }
	.cm-ext-reviews__sub { grid-template-columns: repeat(3, 1fr); flex: 1; max-width: 560px; }
}

/* Etap 7: filtr katalogu [cm_filtry], nagłówek wyników, linia „Pasuje” na karcie. Mobile first. */
.cm-filtry { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 0 0 16px; padding: 12px; border: 1px solid #dfe3e8; border-radius: 10px; background: #f8fafb; }
.cm-filtry__field { display: flex; flex-direction: column; gap: 4px; grid-column: 1 / -1; min-width: 0; }
.cm-filtry__field--half { grid-column: auto; }
.cm-filtry__field label { font-size: .9em; font-weight: 600; color: #1d2329; }
.cm-filtry select, .cm-filtry input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #c4cbd2; border-radius: 6px; background: #fff; font-size: 16px; }
.cm-filtry__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cm-filtry__submit { min-height: 44px; padding: 8px 24px; border: 0; border-radius: 6px; background: #0c2e4b; color: #fff; font-weight: 600; cursor: pointer; }
.cm-filtry__clear { padding: 10px 0; }
.cm-filter-heading { margin: 0 0 12px; font-weight: 600; font-size: 1.05em; }
.cm-filter-empty { margin: 8px 0 16px; }
/* Etap 6b: blok „Pasuje” (cena za dzień duża, dieta i kod mniejszym). */
.cm-match { display: block; margin: 8px 0 0; font-weight: 400; color: #1d2329; line-height: 1.35; clear: both; }
.cm-match__price { display: inline-block; padding: 4px 12px; border-radius: 6px; background: #B3BD13; color: #0C2E4B; font-size: 1.4em; font-weight: 700; line-height: 1.2; }
.cm-match__od, .cm-match__unit { font-size: .6em; font-weight: 600; }
.cm-match__diet { margin-top: 4px; font-size: .9em; }
.cm-match__label { color: #66707a; }
.cm-match__code { margin-top: 2px; font-size: .9em; font-weight: 600; color: #1f7a4d; }
@media (min-width: 720px) {
	.cm-filtry { grid-template-columns: repeat(6, 1fr); align-items: end; }
	.cm-filtry__field { grid-column: span 2; }
	.cm-filtry__field--half { grid-column: span 1; }
	.cm-filtry__field--city { grid-column: span 2; }
	.cm-filtry__actions { grid-column: span 6; }
}
@media (min-width: 1024px) {
	.cm-filtry { grid-template-columns: 2fr 2fr 1fr 1fr 1fr auto; }
	.cm-filtry__field, .cm-filtry__field--city, .cm-filtry__field--half { grid-column: auto; }
	.cm-filtry__actions { grid-column: auto; }
}
/* Etap 7: podpowiedzi miasta w [cm_filtry]. */
.cm-ac { position: relative; }
.cm-ac__list { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #c4cbd2; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto; }
.cm-ac__list li { padding: 10px 12px; cursor: pointer; min-height: 44px; box-sizing: border-box; }
.cm-ac__list li[aria-selected="true"], .cm-ac__list li:hover { background: #e8eef4; }
.cm-filtry__error { margin: 4px 0 0; color: #b3261e; font-size: .9em; }

/* Etap 6: przycisk „Zamów z kodem” (tryb afiliacja). */
.cm-aff { margin: 6px 0 0; text-align: center; }
.cm-aff__btn { display: inline-block; min-height: 44px; padding: 10px 18px; border-radius: 6px; background: #1f7a4d; color: #fff !important; font-weight: 600; text-decoration: none; box-sizing: border-box; }
.cm-aff__btn:hover, .cm-aff__btn:focus { background: #17603c; }

/* Etap 6b: kod rabatowy (pudełko, cena z kodem, pasek na telefonie, lista kodów). Mobile first. */
.elementor-element-856ca45, .elementor-element-14e1fb3 { display: none !important; } /* stary badge z kodem (Izabella usunie w Elementorze) */
.cm-kod { display: block; clear: both; margin: 8px 0; padding: 10px 12px; border: 2px dashed #B3BD13; border-radius: 10px; background: #fbfcef; color: #0C2E4B; font-weight: 400; line-height: 1.35; text-align: left; }
.cm-kod__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cm-kod__label { flex-basis: 100%; font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: #66707a; }
.cm-kod__code { font-size: 1.35em; font-weight: 800; letter-spacing: .04em; word-break: break-all; }
.cm-kod__value { padding: 2px 8px; border-radius: 999px; background: #0C2E4B; color: #fff; font-weight: 700; font-size: .95em; }
.cm-kod__copy { min-height: 40px; padding: 6px 14px; border: 0; border-radius: 6px; background: #B3BD13; color: #0C2E4B; font-weight: 700; cursor: pointer; }
.cm-kod__copy:hover, .cm-kod__copy:focus { background: #0C2E4B; color: #fff; }
.cm-kod__copy.is-copied { background: #1f7a4d; color: #fff; }
.cm-kod__opis, .cm-kod__price { margin-top: 4px; font-size: .9em; }
.cm-kod__price { font-weight: 600; color: #1f7a4d; }
.cm-kod .cm-aff { text-align: left; }
.cm-kod--diets { margin: 0 auto 16px; max-width: 640px; }
.cm-kod-price { margin-top: 2px; font-size: 13px; font-weight: 600; color: #1f7a4d; text-align: center; }
.cm-kod-bar { position: fixed; z-index: 9990; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); background: #0C2E4B; color: #fff; box-shadow: 0 -4px 12px rgba(0,0,0,.2); }
.cm-kod-bar[hidden] { display: none; }
.cm-kod-bar__text { flex: 1 1 auto; font-size: 15px; }
.cm-kod-bar__close { min-width: 40px; min-height: 40px; border: 0; background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
@media (min-width: 768px) { .cm-kod-bar { display: none !important; } }
.cm-kody { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cm-kody__item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; }
.cm-kody__item.is-featured { border-color: #B3BD13; box-shadow: 0 0 0 1px #B3BD13; }
.cm-kody__logo { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; }
.cm-kody__body { flex: 1 1 auto; min-width: 0; }
.cm-kody__name { margin: 0 0 6px; font-size: 1.1em; }
.cm-kody__link { display: inline-block; margin-top: 6px; font-weight: 600; }
@media (min-width: 768px) { .cm-kody { grid-template-columns: 1fr 1fr; } }

/* Etap 8: ranking najtańszych cateringów [cm_ranking_cen]. Mobile first: poniżej 600 px wiersze tabeli jako karty. */
.cm-ranking { margin: 16px 0; }
.cm-ranking__city { margin-bottom: 16px; }
.cm-ranking__toc { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #dfe3e8; border-radius: 10px; background: #f8fafb; }
.cm-ranking__toc-title { margin: 0 0 6px; font-weight: 700; }
.cm-ranking__toc ol { margin: 0; padding-left: 20px; }
.cm-ranking__sort label { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.cm-ranking__section { margin: 24px 0; scroll-margin-top: 90px; }
.cm-ranking__desc { margin: 0 0 8px; color: #4a535c; }
.cm-ranking__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cm-ranking__table th, .cm-ranking__table td { padding: 8px; border-bottom: 1px solid #e5e8eb; text-align: left; vertical-align: middle; }
.cm-ranking__table thead th { background: #0C2E4B; color: #fff; font-weight: 600; }
.cm-ranking__table tr.is-featured td { background: #fbfcef; }
.cm-ranking__name a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.cm-ranking__logo { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; flex: 0 0 40px; }
.cm-ranking__badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #B3BD13; color: #0C2E4B; font-size: 12px; font-weight: 700; }
.cm-ranking__price { font-weight: 700; white-space: nowrap; }
.cm-ranking__od { font-size: .8em; font-weight: 600; color: #66707a; }
.cm-ranking__code { color: #1f7a4d; white-space: nowrap; }
.cm-ranking__btn { display: inline-block; min-height: 40px; padding: 9px 14px; border-radius: 6px; background: #B3BD13; color: #0C2E4B !important; font-weight: 700; text-decoration: none; white-space: nowrap; box-sizing: border-box; }
.cm-ranking__btn--aff { background: #1f7a4d; color: #fff !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
@media (max-width: 599px) {
	.cm-ranking__table, .cm-ranking__table tbody, .cm-ranking__table tr, .cm-ranking__table td { display: block; width: 100%; box-sizing: border-box; }
	.cm-ranking__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
	.cm-ranking__table tr { position: relative; margin: 0 0 12px; padding: 10px 12px 10px 48px; border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; }
	.cm-ranking__table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
	.cm-ranking__table td::before { content: attr(data-label); color: #66707a; font-weight: 400; flex: 0 0 auto; }
	.cm-ranking__table td.cm-ranking__pos { position: absolute; left: 12px; top: 12px; width: auto; font-size: 1.3em; font-weight: 800; }
	.cm-ranking__table td.cm-ranking__pos::before, .cm-ranking__table td.cm-ranking__name::before, .cm-ranking__table td.cm-ranking__cta::before { content: none; }
	.cm-ranking__table td.cm-ranking__name { flex-wrap: wrap; justify-content: flex-start; }
	.cm-ranking__table td.cm-ranking__cta { padding-top: 8px; }
	.cm-ranking__btn { width: 100%; text-align: center; }
}

/* Etap 6c: wizytówka w trybie free. */
.cm-free-cta { margin: 12px 0; padding: 12px 14px; border: 1px solid #dfe3e8; border-radius: 10px; background: #f8fafb; color: #1d2329; text-align: left; font-weight: 400; }
.cm-free-cta__text { margin: 0 0 8px; font-weight: 600; }
.cm-free-cta .cm-filtry { margin: 0 0 8px; padding: 0; border: 0; background: transparent; }
.cm-free-cta__link { margin: 0; }
.cm-nolink { color: inherit; }

/* Etap 9: free ze starymi danymi. */
.cm-stale { display: inline-block; margin: 6px 0 0; padding: 2px 10px; border-radius: 999px; background: #fff6d6; color: #6b4e00; font-size: 13px; font-weight: 600; }
.cm-match__noprice { font-size: .95em; font-weight: 600; color: #6b4e00; }

/* Etap 10: dane firmy na wizytówce. Mobile first. */
.cm-firma-wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.cm-firma { margin: 16px 0 24px; padding: 14px 16px; border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; color: #1d2329; }
.cm-firma__title { margin: 0 0 8px; font-size: 1.2em; }
.cm-firma__list { margin: 0; }
.cm-firma__row { display: grid; grid-template-columns: 1fr; gap: 0; padding: 6px 0; border-bottom: 1px solid #eef1f3; }
.cm-firma__row:last-child { border-bottom: 0; }
.cm-firma__row dt { font-size: .85em; color: #66707a; }
.cm-firma__row dd { margin: 0; overflow-wrap: anywhere; }
.cm-firma__hours { color: #66707a; }
@media (min-width: 600px) {
	.cm-firma__row { grid-template-columns: 160px 1fr; gap: 12px; }
}

/* Etap 11: komplet danych, cennik, rejestracja */
.cm-complete__bar { height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden; margin: 8px 0 12px; }
.cm-complete__bar span { display: block; height: 100%; background: #16a34a; }
.cm-complete__missing a { text-decoration: underline; }
.cm-cennik { margin: 16px 0; }
.cm-cennik__table { width: 100%; border-collapse: collapse; }
.cm-cennik__table th, .cm-cennik__table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: center; vertical-align: middle; }
.cm-cennik__table tbody th { text-align: left; font-weight: 600; }
.cm-cennik__table thead th { background: #f3f4f6; }
.cm-cennik__yes { color: #15803d; font-weight: 600; }
.cm-cennik__no { color: #9ca3af; }
.cm-cennik__cta .cm-btn { white-space: nowrap; }
.cm-cennik__note { font-size: .9em; color: #4b5563; }
.cm-reg { max-width: 640px; }
.cm-reg fieldset { border: 1px solid #e5e7eb; padding: 8px 12px; margin: 0 0 12px; }
.cm-reg legend { font-size: .9em; padding: 0 4px; }
.cm-reg input[type="text"], .cm-reg input[type="url"], .cm-reg input[type="email"], .cm-reg input[type="tel"], .cm-reg input[type="password"] { width: 100%; }
.cm-reg__hint { display: block; font-size: .85em; }
.cm-reg__admin { font-size: .85em; }
.cm-reg .cm-notice .cm-btn { margin-left: 8px; }
mark.cm-todo { background: #fef3c7; padding: 0 4px; }
@media (max-width: 640px) {
	.cm-cennik__table thead { display: none; }
	.cm-cennik__table tr { display: block; border-bottom: 2px solid #e5e7eb; padding: 6px 0; }
	.cm-cennik__table th, .cm-cennik__table td { display: flex; justify-content: space-between; border: 0; text-align: right; padding: 4px 8px; }
	.cm-cennik__table td::before { content: attr(data-label); font-weight: 600; text-align: left; }
	.cm-cennik__cta td:empty { display: none; }
}
.cm-panel.cm-embed { max-width: none; padding: 0; margin: 0; }
