/*
 * UEK Tools — base styles (wspólne dla wszystkich shortcodów).
 * Prefix klas: .uek-tools
 * Paleta z style_reference.md: #501a33, #914a6a, #faf8f5, #e4e0d8, #838383, #681539
 */

.uek-tools,
.uek-tools *,
.uek-tools *::before,
.uek-tools *::after {
	box-sizing: border-box;
}

/* Wymuszenie ukrywania — niektóre motywy WP nadpisują [hidden] przez display:block */
.uek-tools [hidden],
.uek-tools[hidden] {
	display: none !important;
}

.uek-tools {
	font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
	color: #333;
	line-height: 1.5;
	max-width: 720px;
	margin: 0 auto;
	padding: 24px 16px;
}

.uek-tools *,
.uek-tools h1,
.uek-tools h2,
.uek-tools h3,
.uek-tools h4,
.uek-tools h5,
.uek-tools h6,
.uek-tools p,
.uek-tools span,
.uek-tools button,
.uek-tools input,
.uek-tools select,
.uek-tools textarea,
.uek-tools label,
.uek-tools legend,
.uek-tools a,
.uek-tools li,
.uek-tools td,
.uek-tools th {
	font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
}

.uek-tools h1,
.uek-tools h2,
.uek-tools h3,
.uek-tools h4 {
	color: #000;
	letter-spacing: -0.01em;
	margin: 0;
}

.uek-tools p {
	margin: 0;
}

.uek-tools a {
	color: #914a6a;
	text-decoration: none;
}
.uek-tools a:hover {
	color: #501a33;
}

/* ── Placeholder ── */
.uek-tools--placeholder {
	background: #faf8f5;
	border: 1px dashed #e4e0d8;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
	color: #838383;
}
.uek-tools--placeholder strong {
	color: #501a33;
	font-family: monospace;
}
.uek-tools__note {
	font-size: 12px;
	margin-top: 6px !important;
}

/* ── Buttons ── */
.uek-tools__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	padding: 0 20px;
	border-radius: 9px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	white-space: nowrap;
	background: transparent;
}
.uek-tools__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.uek-tools__btn--primary,
.uek-tools a.uek-tools__btn--primary,
.uek-tools__btn--primary:visited,
.uek-tools__btn--primary:focus,
.uek-tools__btn--primary:active {
	background: #501a33;
	color: #fff !important;
	border-color: #501a33;
}
.uek-tools__btn--primary:hover:not(:disabled),
.uek-tools a.uek-tools__btn--primary:hover {
	background: #3d1326;
	color: #fff !important;
}
.uek-tools__btn--secondary {
	background: #fff;
	color: #501a33;
	border-color: #e4e0d8;
}
.uek-tools__btn--secondary:hover:not(:disabled) {
	border-color: #914a6a;
	color: #501a33;
}
.uek-tools__btn--ghost {
	background: transparent;
	color: #914a6a;
	border-color: transparent;
}
.uek-tools__btn--ghost:hover:not(:disabled) {
	color: #501a33;
}
.uek-tools__btn--xl {
	height: 56px;
	padding: 0 28px;
	font-size: 16px;
	box-shadow: 0 4px 12px rgba(80, 26, 51, 0.3);
}

/* ── Form fields ── */
.uek-tools__field {
	display: block;
	margin-bottom: 16px;
}
.uek-tools__label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #501a33;
	margin-bottom: 6px;
}
.uek-tools__field input[type="text"],
.uek-tools__field input[type="email"],
.uek-tools__field input[type="number"],
.uek-tools__field input[type="date"],
.uek-tools__field select,
.uek-tools__field textarea {
	width: 100%;
	height: 44px;
	padding: 0 16px;
	border: 1px solid #e4e0d8;
	border-radius: 9px;
	font-family: inherit;
	font-size: 14px;
	color: #000;
	background: #fff;
	outline: none;
	transition: border-color 0.2s;
}
.uek-tools__field textarea {
	height: auto;
	min-height: 88px;
	padding: 12px 16px;
	resize: vertical;
}
.uek-tools__field input:focus,
.uek-tools__field select:focus,
.uek-tools__field textarea:focus {
	border-color: #914a6a;
}

.uek-tools__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12px;
	color: #838383;
	margin-bottom: 12px;
	cursor: pointer;
	line-height: 1.4;
}
.uek-tools__checkbox input[type="checkbox"] {
	margin-top: 2px;
	accent-color: #501a33;
	flex-shrink: 0;
}
.uek-tools__checkbox em {
	font-style: italic;
	opacity: 0.7;
}

/* ── Modal ── */
.uek-tools__modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.uek-tools__modal[hidden] {
	display: none;
}
.uek-tools__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}
.uek-tools__modal-card {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	max-width: 440px;
	width: 100%;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	max-height: 90vh;
	overflow-y: auto;
}
.uek-tools__modal-card h3 {
	font-size: 20px;
	margin-bottom: 8px;
}
.uek-tools__modal-card > p {
	font-size: 13px;
	color: #838383;
	margin-bottom: 24px;
}
.uek-tools__modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: #838383;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s;
}
.uek-tools__modal-close:hover {
	background: #faf8f5;
	color: #000;
}
.uek-tools__modal-note {
	font-size: 11px;
	color: #838383;
	text-align: center;
	margin-top: 12px !important;
}

/* Submit button w modalu — pełna szerokość (zgodnie z oryginałem React w-full) */
.uek-tools__modal-card form button[type="submit"],
.uek-tools__modal-card form .uek-tools__btn {
	width: 100%;
	margin-top: 8px;
}

/* ── Mobile ── */
@media (max-width: 640px) {
	.uek-tools {
		padding: 16px 12px;
	}
	.uek-tools__btn--xl {
		height: 52px;
		font-size: 15px;
	}
}
