/* Withdrawal modal — odstapienie od umowy (art. 11a) */

.withdrawal-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
}

.withdrawal-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.withdrawal-modal-content {
	position: relative;
	max-width: 720px;
	margin: 40px auto;
	background: #fff;
	border-radius: 8px;
	padding: 30px 35px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
	max-height: calc(100vh - 80px);
	overflow-y: auto;
}

.withdrawal-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 4px 10px;
}

.withdrawal-modal-close:hover {
	color: #000;
}

.withdrawal-modal h2 {
	margin: 0 0 18px;
	font-size: 22px;
	color: #222;
}

.withdrawal-modal h3 {
	margin: 0 0 14px;
	font-size: 18px;
	color: #222;
}

.withdrawal-intro {
	color: #555;
	font-size: 14px;
	margin: 0 0 18px;
}

.withdrawal-modal fieldset {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 14px 18px;
	margin: 0 0 16px;
}

.withdrawal-modal legend {
	font-weight: 600;
	font-size: 14px;
	padding: 0 8px;
	color: #444;
}

.withdrawal-contract-data dl {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 6px 12px;
	margin: 0;
	font-size: 14px;
}

.withdrawal-contract-data dt {
	font-weight: 600;
	color: #555;
}

.withdrawal-contract-data dd {
	margin: 0;
	color: #222;
}

.withdrawal-declarant-data .form-row {
	margin-bottom: 12px;
}

.withdrawal-declarant-data label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin-bottom: 4px;
}

.withdrawal-declarant-data label .required {
	color: #c0392b;
}

.withdrawal-declarant-data input[type="text"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.withdrawal-declarant-data input[type="text"]:focus {
	border-color: #3498db;
	outline: none;
}

.withdrawal-email-display {
	display: inline-block;
	padding: 6px 10px;
	background: #f5f5f5;
	border-radius: 4px;
	font-size: 14px;
	color: #333;
}

.withdrawal-declarant-data small {
	display: block;
	color: #888;
	font-size: 12px;
	margin-top: 4px;
}

.withdrawal-declaration-text {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	padding: 12px;
	border-radius: 4px;
	font-family: Georgia, serif;
	font-size: 13px;
	color: #333;
	white-space: pre-wrap;
	word-wrap: break-word;
	margin: 8px 0 0;
}

.withdrawal-declaration-note {
	margin: 0 0 6px;
	color: #777;
}

.withdrawal-legal-note {
	background: #fff8e1;
	border-left: 3px solid #f39c12;
	padding: 10px 14px;
	font-size: 13px;
	color: #555;
}

.withdrawal-actions {
	display: flex;
	gap: 10px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.withdrawal-actions .button {
	padding: 10px 22px;
	font-size: 15px;
	cursor: pointer;
	border: 0;
	border-radius: 4px;
}

.withdrawal-actions .button.primary {
	background: #27ae60;
	color: #fff;
}

.withdrawal-actions .button.primary:hover {
	background: #229954;
}

.withdrawal-actions .button.secondary {
	background: #ecf0f1;
	color: #2c3e50;
}

.withdrawal-actions .button.secondary:hover {
	background: #d5dbdb;
}

.withdrawal-actions .button.big {
	font-size: 16px;
	font-weight: 600;
}

body.withdrawal-modal-open {
	overflow: hidden;
}

.withdrawal-trigger {
	background: #fff;
	border: 1px solid #c0392b;
	color: #c0392b;
	padding: 6px 12px;
	cursor: pointer;
	border-radius: 4px;
	font-size: 13px;
	white-space: nowrap;
}

.withdrawal-trigger:hover {
	background: #c0392b;
	color: #fff;
}

.withdrawal-submitted {
	color: #777;
	font-size: 13px;
	font-style: italic;
}

@media (max-width: 600px) {
	.withdrawal-modal-content {
		margin: 10px;
		padding: 20px;
	}
	.withdrawal-contract-data dl {
		grid-template-columns: 1fr;
		gap: 2px 0;
	}
	.withdrawal-contract-data dt {
		margin-top: 6px;
	}
}

/* Publiczny formularz /odstapienie-od-umowy. */
.withdrawal-public-wrap {
	max-width: 720px;
	margin: 0 auto;
}

.withdrawal-public-intro {
	padding: 16px 20px;
	background: #f5f9f7;
	border-left: 4px solid #2DB18C;
	border-radius: 4px;
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.6;
}

/* Form layout — label po lewej, input po prawej (zgodnie z /dane).
   Forsujemy lokalnie bo na publicznej subdomenie brak globalnego CSS dla profile/. */
.withdrawal-form .form-section-wrapper {
	max-width: 720px;
	margin: 0 auto 30px;
}

.withdrawal-form .form-section {
	padding: 20px 0;
	border-bottom: 1px solid #e5e7eb;
}

.withdrawal-form .form-section:last-child {
	border-bottom: 0;
}

.withdrawal-form .form-section h4 {
	margin: 0 0 18px;
	font-size: 16px;
	color: #2DB18C;
	font-weight: 600;
}

.withdrawal-form .form-group-inline,
.withdrawal-form .form-group {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.withdrawal-form .form-group-inline > label,
.withdrawal-form .form-group > label {
	flex: 0 0 200px;
	max-width: 200px;
	padding-top: 8px;
	font-weight: 600;
	font-size: 14px;
	color: #444;
	text-align: right;
	line-height: 1.4;
}

.withdrawal-form .form-group-inline > label small {
	display: block;
	font-weight: 400;
	color: #888;
	font-size: 12px;
	margin-top: 2px;
}

.withdrawal-form .form-group-inline > label .required {
	color: #c0392b;
}

.withdrawal-form .form-group-inline > .form-control,
.withdrawal-form .form-group-inline > input.form-control,
.withdrawal-form .form-control,
.withdrawal-form input.form-control {
	flex: 1 1 280px;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.withdrawal-form input.form-control:focus {
	border-color: #2DB18C;
	outline: none;
	box-shadow: 0 0 0 3px rgba(45,177,140,0.15);
}

.withdrawal-form .form-control-static {
	flex: 1 1 280px;
	padding: 9px 0;
	font-size: 14px;
	color: #222;
}

.withdrawal-form .help-block {
	flex: 1 1 100%;
	margin-left: 216px;
	font-size: 12px;
	color: #888;
	line-height: 1.4;
}

.withdrawal-form .help-block.error,
.withdrawal-form .help-block a {
	color: #c0392b;
}

.withdrawal-form .help-block a {
	color: #2DB18C;
	text-decoration: underline;
}

.withdrawal-form .form-group-inline.has-error > .form-control,
.withdrawal-form .form-group-inline.has-error input.form-control,
.withdrawal-form .form-group.has-error .form-control {
	border-color: #c0392b;
}

.withdrawal-form .g-recaptcha {
	margin-left: 216px;
}

.withdrawal-form .button-outer-wrapper {
	text-align: center;
	margin-top: 24px;
	display: flex;
	justify-content: center;
	align-items: stretch;
	gap: 12px;
	flex-wrap: wrap;
}

.withdrawal-form .button-outer-wrapper .btn {
	min-height: 44px;
	padding: 10px 22px;
	font-size: 14px;
	line-height: 1.4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border-radius: 4px;
	white-space: normal;
	text-align: center;
	min-width: 200px;
}

/* Modal potwierdzenia — popup zamiast natywnego window.confirm */
.withdrawal-confirm-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
}

.withdrawal-confirm-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.withdrawal-confirm-modal-content {
	position: relative;
	max-width: 520px;
	margin: 80px auto;
	background: #fff;
	border-radius: 8px;
	padding: 28px 32px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.withdrawal-confirm-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 4px 10px;
}

.withdrawal-confirm-modal-close:hover {
	color: #000;
}

.withdrawal-confirm-modal h2 {
	margin: 0 0 14px;
	font-size: 20px;
	color: #222;
}

.withdrawal-confirm-modal p {
	font-size: 14px;
	line-height: 1.5;
	color: #333;
	margin: 0 0 10px;
}

.withdrawal-confirm-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.withdrawal-confirm-actions .btn {
	min-height: 44px;
	min-width: 160px;
	padding: 10px 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border-radius: 4px;
	font-size: 14px;
	white-space: normal;
	text-align: center;
}

@media (max-width: 600px) {
	.withdrawal-confirm-modal-content {
		margin: 40px 16px;
		padding: 20px;
	}
}

/* Mobile — label nad inputem, pełna szerokość */
@media (max-width: 700px) {
	.withdrawal-form .form-group-inline,
	.withdrawal-form .form-group {
		flex-direction: column;
		gap: 6px;
	}
	.withdrawal-form .form-group-inline > label,
	.withdrawal-form .form-group > label {
		flex: 1 1 100%;
		max-width: 100%;
		text-align: left;
		padding-top: 0;
	}
	.withdrawal-form .help-block,
	.withdrawal-form .g-recaptcha {
		margin-left: 0;
	}
}

.withdrawal-public-intro p {
	margin: 0 0 10px;
}

.withdrawal-public-intro p:last-child {
	margin-bottom: 0;
}

.withdrawal-form .form-row small.error {
	display: block;
	color: #c0392b;
	font-size: 13px;
	margin-top: 4px;
	font-weight: 600;
}

.withdrawal-form input[type="number"],
.withdrawal-form input[type="email"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.withdrawal-form input[type="number"]:focus,
.withdrawal-form input[type="email"]:focus {
	border-color: #3498db;
	outline: none;
}

.withdrawal-step-2-public dl {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 6px 12px;
	margin: 0;
	font-size: 14px;
}

.withdrawal-step-2-public dt {
	font-weight: 600;
	color: #555;
}

.withdrawal-step-2-public dd {
	margin: 0;
	color: #222;
}

/* ======= Tabela historii płatności — responsywność + 5-kolumnowy layout ======= */
.payments-history-table {
	table-layout: fixed;
	width: 100%;
	border-collapse: collapse;
}

.payments-history-table th,
.payments-history-table td {
	padding: 12px 10px;
	vertical-align: middle;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.payments-history-table thead th {
	white-space: nowrap;
	font-weight: 600;
	color: #555;
	border-bottom: 2px solid #e0e0e0;
	background: #f9fafb;
}

.payments-history-table .col-order      { width: 30%; }
.payments-history-table .col-date       { width: 16%; }
.payments-history-table .col-value      { width: 12%; }
.payments-history-table .col-invoice    { width: 10%; text-align: center; }
.payments-history-table .col-withdrawal { width: 32%; text-align: center; }

.payments-history-table .payment-id {
	display: inline-block;
	font-size: 12px;
	color: #888;
	font-weight: 600;
	letter-spacing: 0.3px;
	margin-bottom: 4px;
}

.payments-history-table .payment-orders {
	color: #222;
	font-size: 14px;
	line-height: 1.4;
}

.payments-history-table .col-value small {
	display: block;
	color: #888;
	font-size: 11px;
	margin-top: 4px;
	line-height: 1.3;
}

.payments-history-table .muted {
	color: #aaa;
	font-style: italic;
}

.payments-history-table .col-invoice img {
	vertical-align: middle;
	max-width: 24px;
	height: auto;
}

.payments-history-table .withdrawal-trigger {
	white-space: normal;
	line-height: 1.2;
	max-width: 100%;
}

/* Średni breakpoint — tablety: kompresja kolumn, mniejsza czcionka */
@media (max-width: 1024px) {
	.payments-history-table th,
	.payments-history-table td {
		padding: 10px 6px;
		font-size: 13px;
	}
	.payments-history-table .col-order      { width: 28%; }
	.payments-history-table .col-date       { width: 16%; }
	.payments-history-table .col-value      { width: 12%; }
	.payments-history-table .col-invoice    { width: 10%; }
	.payments-history-table .col-withdrawal { width: 34%; }
	.payments-history-table .withdrawal-trigger {
		font-size: 12px;
		padding: 5px 8px;
	}
}

/* Mobile — układ kartowy: każdy wiersz to karta, każda komórka pełna szerokość
   z etykietą z data-title (już zdefiniowane w _campaigns-main.css dla .table-resp-wrapper).
   Tu tylko poprawiamy specyfikę dla payments-history-table. */
@media (max-width: 768px) {
	.payments-history-table {
		table-layout: auto;
	}
	.payments-history-table .col-order,
	.payments-history-table .col-date,
	.payments-history-table .col-value,
	.payments-history-table .col-invoice,
	.payments-history-table .col-withdrawal {
		width: 100% !important;
		text-align: left;
	}
	.payments-history-table .col-withdrawal {
		padding-top: 18px !important;
		padding-bottom: 18px !important;
	}
	.payments-history-table .withdrawal-trigger {
		width: 100%;
		padding: 10px 14px;
		font-size: 14px;
	}
	.payments-history-table .withdrawal-submitted {
		font-size: 13px;
		display: block;
	}
	.payments-history-table tbody tr {
		display: block;
		margin-bottom: 14px;
		border-radius: 6px;
		overflow: hidden;
		box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	}
}
