/**
 * Style frontendowe dla kart ofert
 *
 * @package MitherzOffers
 */

.mitherz-offers-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.mitherz-offer-card {
	margin-bottom: 30px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mitherz-offer-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	border-color: #cbd5e1;
}

.mitherz-offer-highlighted {
	border-color: #dc2626;
	box-shadow: 0 0 0 1px #dc2626;
}

.mitherz-offer-fields {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	grid-template-rows: auto auto;
	grid-auto-flow: column;
	gap: 0;
	margin-bottom: 0;
	margin-left: calc(-1 * var(--mitherz-card-padding, 20px));
	margin-right: calc(-1 * var(--mitherz-card-padding, 20px));
	width: calc(100% + 2 * var(--mitherz-card-padding, 20px));
	padding-bottom: 0;
	border-bottom: none;
}

/* Nagłówki – tylko czerwone serduszka, tło w pasek */
.mitherz-offer-fields .mitherz-offer-col:nth-child(odd) {
	background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
	padding: 18px 20px;
	border-bottom: 2px solid #fecaca;
}

.mitherz-offer-fields .mitherz-offer-col:nth-child(even) {
	padding: 18px 20px;
	background: #fff;
}

.mitherz-offer-fields .mitherz-offer-col:nth-child(1),
.mitherz-offer-fields .mitherz-offer-col:nth-child(2) {
	padding-left: calc(20px + var(--mitherz-card-padding, 20px));
}

.mitherz-offer-fields .mitherz-offer-col:nth-child(9),
.mitherz-offer-fields .mitherz-offer-col:nth-child(10) {
	padding-right: calc(20px + var(--mitherz-card-padding, 20px));
}

/* Pionowe linie między kolumnami */
.mitherz-offer-fields .mitherz-offer-col:nth-child(2),
.mitherz-offer-fields .mitherz-offer-col:nth-child(4),
.mitherz-offer-fields .mitherz-offer-col:nth-child(6),
.mitherz-offer-fields .mitherz-offer-col:nth-child(8) {
	border-right: 1px solid #f1f5f9;
}

.mitherz-offer-fields {
	border-bottom: 1px solid #e2e8f0;
}

.mitherz-offer-col {
	display: flex;
	flex-direction: column;
}

.mitherz-offer-head {
	font-weight: 700;
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: 0.01em;
	color: #1e293b;
}

.mitherz-offer-head .mitherz-offer-icon-heart {
	margin-right: 6px;
}

.mitherz-offer-value {
	margin: 0;
	line-height: 1.5;
	font-size: 14px;
	color: #334155;
}

.mitherz-offer-col p.mitherz-offer-value {
	margin: 0;
}

.mitherz-offer-col p {
	margin: 4px 0;
	line-height: 1.5;
}

.mitherz-offer-icon {
	margin-right: 6px;
}

.mitherz-offer-icon-heart {
	color: #dc2626;
	font-size: 0.95em;
}

.mitherz-offer-label {
	font-weight: bold;
	margin-bottom: 8px;
	font-size: 14px;
}

.mitherz-offer-accordion-actions {
	margin-top: 1.25rem;
	display: flex;
	justify-content: flex-end;
}

.mitherz-offer-accordion-actions .mitherz-offer-button {
	width: auto;
}

.mitherz-offer-button {
	display: inline-block;
	padding: 12px 24px;
	text-decoration: none;
	border-radius: 4px;
	font-weight: bold;
	text-align: center;
	transition: opacity 0.3s ease;
	border: none;
	cursor: pointer;
}

.mitherz-offer-button:hover {
	opacity: 0.9;
}

.mitherz-offer-accordion {
	margin-top: 0;
	margin-left: calc(-1 * var(--mitherz-card-padding, 20px));
	margin-right: calc(-1 * var(--mitherz-card-padding, 20px));
	width: calc(100% + 2 * var(--mitherz-card-padding, 20px));
	border-top: 0;
	padding-top: 0;
}

.mitherz-offer-accordion-toggle {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 16px;
	padding-left: calc(20px + var(--mitherz-card-padding, 20px));
	padding-right: calc(20px + var(--mitherz-card-padding, 20px));
	background: #dc2626;
	border: none;
	border-radius: 0;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	text-align: left;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.mitherz-offer-accordion-toggle:hover {
	background: #b91c1c;
	color: #fff;
}

.mitherz-offer-accordion-icon {
	transition: transform 0.3s ease;
	font-size: 12px;
	color: #fff;
}

.mitherz-offer-accordion-toggle[aria-expanded="true"] .mitherz-offer-accordion-icon {
	transform: rotate(180deg);
}

.mitherz-offer-accordion-content {
	margin-top: 0;
	padding: 14px 22px 20px;
	border: none;
	border-radius: 0;
	line-height: 1.6;
	background: #fff;
}

.mitherz-offer-accordion-content p {
	margin-bottom: 12px;
}

.mitherz-offer-fb-link {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #e5e5e5;
}

.mitherz-offer-fb-link a {
	color: #1877F2;
	text-decoration: none;
}

.mitherz-offer-fb-link a:hover {
	text-decoration: underline;
}

/* Puste pola - myślnik */
.mitherz-offer-empty {
	color: #999;
	font-style: italic;
	opacity: 0.7;
}

/* Komunikat gdy brak ofert */
.mitherz-offers-empty {
	text-align: center;
	padding: 60px 20px;
	max-width: 500px;
	margin: 40px auto;
	background-color: #f9f9f9;
	border-radius: 12px;
	border: 2px dashed #e0e0e0;
}

.mitherz-offers-empty-icon {
	font-size: 64px;
	margin-bottom: 20px;
	opacity: 0.5;
}

.mitherz-offers-empty-title {
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 12px 0;
	color: #333;
}

.mitherz-offers-empty-text {
	font-size: 16px;
	color: #666;
	margin: 0;
	line-height: 1.6;
}

/* Responsywność */
@media (max-width: 1024px) {
	.mitherz-offer-fields {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: repeat(5, auto auto);
		grid-auto-flow: row;
		gap: 12px;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(-n+5) {
		border-bottom: none;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(2),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(4),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(6),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(8) {
		border-right: none;
	}

	.mitherz-offer-accordion-actions .mitherz-offer-button {
		width: auto;
	}

	.mitherz-offer-head {
		font-size: 13px;
	}

	.mitherz-offer-col p {
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.mitherz-offer-fields {
		grid-template-columns: 1fr;
		grid-template-rows: repeat(10, auto);
		gap: 4px 0;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(2),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(4),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(6),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(8) {
		border-right: none;
	}

	.mitherz-offer-fields .mitherz-offer-col {
		border-bottom: none;
		padding-bottom: 10px;
		margin-bottom: 6px;
	}

	.mitherz-offer-fields .mitherz-offer-col:nth-child(odd) {
		margin-bottom: 0;
		padding-bottom: 2px;
	}

	.mitherz-offer-fields .mitherz-offer-col:nth-child(even) {
		margin-bottom: 12px;
	}

	.mitherz-offer-fields .mitherz-offer-col:last-child {
		margin-bottom: 0;
	}

	.mitherz-offer-card {
		padding: 0 15px !important;
		margin-bottom: 20px;
	}

	.mitherz-offer-fields {
		margin-left: -15px;
		margin-right: -15px;
		width: calc(100% + 30px);
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(odd),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(even) {
		padding: 16px 18px;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(1),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(2) {
		padding-left: 35px;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(9),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(10) {
		padding-right: 35px;
	}

	.mitherz-offer-accordion {
		margin-left: -15px;
		margin-right: -15px;
		width: calc(100% + 30px);
	}
	.mitherz-offer-accordion-toggle {
		padding: 16px 35px;
		padding-left: 35px;
		padding-right: 35px;
	}

	.mitherz-offers-container {
		padding: 15px;
	}

	.mitherz-offer-head {
		font-size: 13px;
		margin-bottom: 6px;
	}

	.mitherz-offer-col p {
		font-size: 14px;
		margin: 6px 0;
	}

	.mitherz-offer-button {
		width: 100%;
		padding: 12px;
		font-size: 15px;
	}

	.mitherz-offer-accordion-actions .mitherz-offer-button {
		width: auto;
	}

	.mitherz-offer-accordion-toggle {
		font-size: 15px;
		padding-top: 16px;
		padding-bottom: 16px;
	}
}

@media (max-width: 480px) {
	.mitherz-offers-container {
		padding: 10px;
	}

	.mitherz-offer-card {
		padding: 0 12px !important;
		margin-bottom: 15px;
	}

	.mitherz-offer-fields {
		margin-left: -12px;
		margin-right: -12px;
		width: calc(100% + 24px);
		gap: 2px 0;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(odd),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(even) {
		padding: 14px 16px;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(1),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(2) {
		padding-left: 32px;
	}
	.mitherz-offer-fields .mitherz-offer-col:nth-child(9),
	.mitherz-offer-fields .mitherz-offer-col:nth-child(10) {
		padding-right: 32px;
	}

	.mitherz-offer-accordion {
		margin-left: -12px;
		margin-right: -12px;
		width: calc(100% + 24px);
	}
	.mitherz-offer-accordion-toggle {
		padding: 14px 32px;
		padding-left: 32px;
		padding-right: 32px;
	}

	.mitherz-offer-head {
		font-size: 12px;
		margin-bottom: 5px;
	}

	.mitherz-offer-col p {
		font-size: 13px;
		margin: 5px 0;
		line-height: 1.4;
	}

	.mitherz-offer-button {
		width: 100%;
		padding: 10px;
		font-size: 14px;
	}

	.mitherz-offer-accordion-actions .mitherz-offer-button {
		width: auto;
	}

	.mitherz-offer-icon {
		margin-right: 4px;
		font-size: 14px;
	}

	.mitherz-offer-accordion-toggle {
		font-size: 14px;
		padding-top: 14px;
		padding-bottom: 14px;
	}

	.mitherz-offer-accordion-content {
		margin-top: 0;
		padding-top: 12px;
		font-size: 13px;
	}

	.mitherz-offers-empty {
		padding: 40px 15px;
		margin: 20px auto;
	}

	.mitherz-offers-empty-icon {
		font-size: 48px;
		margin-bottom: 15px;
	}

	.mitherz-offers-empty-title {
		font-size: 20px;
		margin-bottom: 10px;
	}

	.mitherz-offers-empty-text {
		font-size: 14px;
	}
}
