/* =====================================================================
   APTEKI — Single Pharmacy Page
   Tło: białe. Czcionka: dziedziczona z motywu.
   Padding/margin poziomy: dziedziczony z motywu (brak własnych).
   ===================================================================== */

.apd-pharmacy-page {
	--apd-green:       #2e7d5e;
	--apd-green-pill:  #d4f0e4;
	--apd-green-text:  #1a6644;
	--apd-btn-green:   #2e7d5e;
	--apd-ink:         #1a1a1a;
	--apd-muted:       #666;
	--apd-line:        #e0e8e4;
	--apd-tag-bg:      #e0e0e0;
	--apd-tag-ink:     #333;

	background: #fff;
	color: var(--apd-ink);
	font-family: inherit;
	font-size: 14px;
	padding-top: 24px;
	padding-bottom: 64px;
}

/* Shell — 30px odstęp po lewej i prawej */
.apd-pharmacy-page__shell {
	padding-left: 30px;
	padding-right: 30px;
}

/* ── Główny layout: main + sidebar 30% ──────────────────────────────── */
.apd-pharmacy-page__layout {
	display: grid;
	gap: 40px;
	grid-template-columns: 1fr 30%;
	align-items: start;
}

.apd-pharmacy-page__main    { min-width: 0; }
.apd-pharmacy-page__sidebar { min-width: 0; }

/* ── Breadcrumbs (Yoast) ───────────────────────────────────────────── */
.apd-breadcrumbs {
	color: var(--apd-muted);
	font-size: 13px;
	margin-bottom: 16px;
}

.apd-breadcrumbs span,
.apd-breadcrumbs a {
	color: var(--apd-muted);
	text-decoration: none;
}

.apd-breadcrumbs a:hover {
	color: var(--apd-ink);
	text-decoration: underline;
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.apd-pharmacy-hero {
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--apd-line);
	border-radius: 0;
	box-shadow: none;
	margin-bottom: 28px;
	padding: 0 0 24px;
}

.apd-pharmacy-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.apd-chip {
	background: var(--apd-tag-bg);
	border-radius: 4px;
	color: var(--apd-tag-ink);
	display: inline-flex;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 4px 10px;
	text-transform: uppercase;
}

.apd-chip--status {
	background: #b8e0c8;
	color: #1a5c38;
}

.apd-pharmacy-hero__title {
	color: var(--apd-ink);
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0 0 4px;
}

/* Jeden rząd: status + przycisk, oba tej samej wysokości */
.apd-pharmacy-hero__bar {
	align-items: stretch;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.apd-signal {
	background: var(--apd-green-pill);
	border-radius: 6px;
	color: var(--apd-green-text);
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	padding: 8px 14px;
	text-decoration: none;
}

.apd-signal__label {
	font-family: inherit;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	opacity: 0.7;
	text-transform: uppercase;
	margin-bottom: 2px;
}

.apd-signal strong {
	font-size: 14px;
	font-weight: 700;
}

.apd-signal strong.is-open   { color: var(--apd-green-text); }
.apd-signal strong.is-closed { color: #a03020; }

.apd-button {
	align-items: center;
	border-radius: 6px;
	display: inline-flex;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	justify-content: center;
	padding: 0 20px;  /* brak padding pionowego — wysokość pochodzi z align-items: stretch */
	text-decoration: none;
	transition: opacity 0.15s;
}

.apd-button:hover { opacity: 0.85; }

.apd-button--primary {
	background: var(--apd-btn-green);
	color: #fff;
}

.apd-button--secondary {
	background: transparent;
	border: 1px solid var(--apd-green);
	color: var(--apd-green-text);
}

/* ── Godziny + kontakt + mapa ─────────────────────────────────────── */
.apd-primary-grid {
	align-items: start;
	display: grid;
	gap: 28px;
	grid-template-columns: minmax(220px, .82fr) minmax(220px, .82fr) minmax(360px, 1.36fr);
	margin-bottom: 32px;
}

.apd-primary-grid > .apd-section,
.apd-primary-grid > .apteki-map-block {
	margin-bottom: 0;
}

.apd-pharmacy-page .apd-primary-grid .apteki-map-block__header h2 {
	font-size: 17px;
	font-weight: 600;
}

.apd-pharmacy-page .apd-primary-grid .apteki-map-block--single .apteki-map-canvas {
	height: 292px;
}

/* Kept for older custom template overrides. */
.apd-row-two {
	display: grid;
	gap: 32px;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 24px;
}

/* ── Sekcja (wspólne) ──────────────────────────────────────────────── */
.apd-section {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin-bottom: 28px;
	padding: 0;
}

.apd-section__header {
	align-items: center;
	border-bottom: 1px solid var(--apd-line);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	margin-bottom: 14px;
	padding-bottom: 8px;
}

.apd-section__header h2 {
	color: var(--apd-ink);
	font-size: 17px;
	font-weight: 600;
	margin: 0;
}

.apd-section__header a,
.apd-section__header-note {
	color: var(--apd-muted);
	font-size: 12px;
	text-decoration: none;
}

.apd-pill {
	background: var(--apd-green-pill);
	border-radius: 4px;
	color: var(--apd-green-text);
	display: inline-flex;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 3px 8px;
	text-transform: uppercase;
}

/* ── Godziny ────────────────────────────────────────────────────────── */
.apd-hours-grid {
	display: grid;
	grid-template-columns: 1fr;
}

.apd-hours-row {
	align-items: center;
	border-bottom: 1px solid var(--apd-line);
	border-radius: 3px;
	display: flex;
	font-size: 13px;
	justify-content: space-between;
	margin: 0 -8px;
	padding: 8px;
}

.apd-hours-row:last-child { border-bottom: none; }

.apd-hours-row.is-today {
	background: #f1f3f2;
	box-shadow: inset 3px 0 #7b8580;
}

.apd-hours-row__day {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.apd-hours-row__today {
	background: #fff;
	border: 1px solid #cfd5d2;
	border-radius: 3px;
	color: #505955;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	padding: 3px 5px;
	text-transform: uppercase;
}

/* ── Dane kontaktowe ────────────────────────────────────────────────── */
.apd-contact-grid { display: grid; grid-template-columns: 1fr; }
.apd-card-block   { background: transparent; padding: 0; }

.apd-data-row {
	border-bottom: 1px solid var(--apd-line);
	display: grid;
	grid-template-columns: 100px 1fr;
	gap: 8px;
	padding: 8px 0;
	align-items: baseline;
}

.apd-data-row:last-child { border-bottom: none; }

.apd-data-row span {
	color: var(--apd-muted);
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
}

.apd-data-row p,
.apd-data-row a {
	color: var(--apd-ink);
	font-size: 13px;
	line-height: 1.5;
	margin: 0;
	text-decoration: none;
	word-break: break-word;
}

.apd-data-row a:hover { text-decoration: underline; }

.apd-inline-link {
	color: var(--apd-green-text);
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	margin-top: 10px;
	text-decoration: none;
}

.apd-inline-link:hover { text-decoration: underline; }

/* ── Usługi — ładne labele jak na screenie ──────────────────────────── */
.apd-services-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.apd-service-item {
	align-items: center;
	background: var(--apd-green-pill);
	border-radius: 999px;
	color: var(--apd-green-text);
	display: inline-flex;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	gap: 6px;
	padding: 6px 14px;
}

.apd-service-item::before {
	content: "•";
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
}

/* ── Legal row — dwie osobne sekcje obok siebie ─────────────────────── */
.apd-legal-row {
	display: grid;
	gap: 32px;
	grid-template-columns: repeat(2, 1fr);
	margin-bottom: 28px;
}

.apd-legal-row .apd-section {
	margin-bottom: 0;
}

/* ── Meta grid ───────────────────────────────────────────────────────── */
.apd-meta-grid {
	display: grid;
	gap: 32px;
	grid-template-columns: repeat(2, 1fr);
}

.apd-subsection-title {
	color: var(--apd-ink);
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 12px;
}

/* ── Note cards ─────────────────────────────────────────────────────── */
.apd-note-stack {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, 1fr);
	margin-top: 16px;
}

.apd-note-card {
	background: transparent;
	border: 1px solid var(--apd-line);
	border-radius: 6px;
	box-shadow: none;
	padding: 16px;
}

.apd-note-card h3 {
	color: var(--apd-ink);
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 8px;
}

.apd-note-card p {
	color: var(--apd-muted);
	font-size: 13px;
	line-height: 1.7;
	margin: 0;
	white-space: pre-line;
	word-break: break-word;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.apd-pharmacy-page__layout {
		grid-template-columns: 1fr;
	}

	.apd-primary-grid {
		grid-template-columns: 1fr 1fr;
	}

	.apd-primary-grid > .apteki-map-block {
		grid-column: 1 / -1;
	}

	.apd-pharmacy-page .apd-primary-grid .apteki-map-block--single .apteki-map-canvas {
		height: 360px;
	}
}

@media (max-width: 720px) {
	.apd-primary-grid,
	.apd-row-two,
	.apd-legal-row,
	.apd-meta-grid,
	.apd-note-stack {
		grid-template-columns: 1fr;
	}

	.apd-primary-grid > .apteki-map-block {
		grid-column: auto;
	}
}

@media (max-width: 640px) {
	.apd-pharmacy-hero__title { font-size: 24px; }

	.apd-pharmacy-hero__bar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 8px;
	}

	.apd-signal {
		flex-direction: column;
		justify-content: center;
	}

	.apd-button {
		grid-column: auto;
		padding: 12px 18px;
		justify-content: center;
	}

	.apd-data-row {
		grid-template-columns: 1fr;
		gap: 2px;
	}
}
