/* =============================================================
   PRZEDSZKOLE DOKUMENTY — FRONTEND STYLES
   ============================================================= */

/* ---- Reset ---- */
.pd-docs-wrap *,
.pd-docs-wrap *::before,
.pd-docs-wrap *::after {
	box-sizing: border-box;
}

.pd-docs-wrap {
	width: 100%;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	line-height: inherit;
}

/* =============================================================
   GROUP
   ============================================================= */
.pd-group + .pd-group {
	margin-top: 40px;
}

.pd-group-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.pd-group-icon {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #FF6B9D;
	flex-shrink: 0;
}

.pd-group-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	color: #1a1a2e;
	line-height: 1.3;
}

.pd-group-desc {
	margin: 0 0 14px;
	font-family: inherit;
	font-size: 14px;
	color: #666666;
	line-height: 1.6;
}

/* Separator via pseudo element */
.pd-group + .pd-group.pd-sep-solid::before,
.pd-group + .pd-group.pd-sep-dashed::before,
.pd-group + .pd-group.pd-sep-dotted::before {
	content: '';
	display: block;
	border-top: 1px solid #FFE4F0;
	margin-bottom: 40px;
}

.pd-group + .pd-group.pd-sep-dashed::before { border-style: dashed; }
.pd-group + .pd-group.pd-sep-dotted::before { border-style: dotted; }

.pd-group + .pd-group.pd-sep-gradient::before {
	content: '';
	display: block;
	height: 1px;
	background: linear-gradient(90deg, transparent, #FFE4F0 30%, #FFE4F0 70%, transparent);
	margin-bottom: 40px;
}

/* =============================================================
   FILES LIST
   ============================================================= */
.pd-files-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* =============================================================
   FILE ITEM
   ============================================================= */
.pd-file-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: #ffffff;
	border: 1px solid #FFE4F0;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(255, 107, 157, 0.08);
	transition:
		background-color 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.18s ease,
		border-color 0.18s ease;
	cursor: default;
}

.pd-file-item:hover {
	background: #FFF8FC;
	box-shadow: 0 8px 24px rgba(255, 107, 157, 0.16);
	transform: translateY(-1px);
}

/* =============================================================
   FILE ICON
   ============================================================= */
.pd-file-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pd-file-icon svg {
	display: block;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

/* =============================================================
   FILE INFO
   ============================================================= */
.pd-file-info {
	flex: 1;
	min-width: 0;
}

.pd-file-name {
	display: block;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	color: #1a1a2e;
	line-height: 1.35;
	transition: color 0.15s ease;
	word-break: break-word;
}

.pd-file-item:hover .pd-file-name {
	color: #FF6B9D;
}

.pd-file-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 5px;
}

.pd-file-ext-badge {
	display: inline-flex;
	align-items: center;
	padding: 1px 7px;
	border-radius: 4px;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	background-color: color-mix(in srgb, var(--ext-color, #A0AEC0) 12%, transparent);
	color: var(--ext-color, #A0AEC0);
	line-height: 1.6;
}

.pd-file-size,
.pd-file-date {
	font-family: inherit;
	font-size: 12px;
	color: #999999;
	line-height: 1;
}

.pd-file-meta-sep {
	color: #ddd;
	font-size: 10px;
}

/* =============================================================
   DOWNLOAD BUTTON
   ============================================================= */
.pd-download-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	padding: 9px 18px 9px 14px;
	border-radius: 50px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 0.18s ease,
		color 0.18s ease,
		transform 0.18s ease,
		box-shadow 0.18s ease;
	border: 2px solid transparent;
	line-height: 1;
	white-space: nowrap;

	/* Default: color-based on file type */
	background-color: color-mix(in srgb, var(--btn-color, #FF6B9D) 12%, transparent);
	color: var(--btn-color, #FF6B9D);
}

.pd-download-btn:hover {
	background-color: var(--btn-color, #FF6B9D);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px color-mix(in srgb, var(--btn-color, #FF6B9D) 35%, transparent);
	text-decoration: none;
}

.pd-download-btn:active {
	transform: translateY(0);
}

.pd-dl-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	transition: transform 0.18s ease;
}

.pd-download-btn:hover .pd-dl-icon {
	transform: translateY(2px);
}

.pd-dl-text {
	font-family: inherit;
}

/* ---- Button styles variants ---- */
.pd-btn-outline .pd-download-btn {
	background-color: transparent;
	border-color: var(--btn-color, #FF6B9D);
}

.pd-btn-outline .pd-download-btn:hover {
	background-color: var(--btn-color, #FF6B9D);
	border-color: var(--btn-color, #FF6B9D);
	color: #ffffff;
}

.pd-btn-ghost .pd-download-btn {
	background-color: transparent;
	padding-left: 4px;
	padding-right: 4px;
}

.pd-btn-ghost .pd-download-btn:hover {
	background-color: color-mix(in srgb, var(--btn-color, #FF6B9D) 10%, transparent);
	color: var(--btn-color, #FF6B9D);
}

.pd-btn-icon-only .pd-dl-text { display: none; }

.pd-btn-icon-only .pd-download-btn {
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	justify-content: center;
}

/* =============================================================
   EMPTY STATE
   ============================================================= */
.pd-docs-empty {
	padding: 30px 20px;
	text-align: center;
	color: #aaa;
	font-family: inherit;
	font-size: 14px;
}

/* =============================================================
   ANIMATIONS — entrance
   ============================================================= */
.pd-animate .pd-file-item {
	animation: pd-item-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: var(--item-delay, 0s);
}

@keyframes pd-item-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.pd-animate .pd-group-title {
	animation: pd-title-in 0.4s ease both;
}

@keyframes pd-title-in {
	from { opacity: 0; transform: translateX(-8px); }
	to   { opacity: 1; transform: translateX(0); }
}

/* =============================================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================================= */
@media (max-width: 1024px) {
	.pd-file-item {
		gap: 12px;
		padding: 12px 14px;
	}

	.pd-file-icon svg {
		width: 36px;
		height: 36px;
	}

	.pd-file-name {
		font-size: 14px;
	}
}

/* =============================================================
   RESPONSIVE — Mobile Landscape (≤ 768px)
   ============================================================= */
@media (max-width: 768px) {
	.pd-file-item {
		gap: 10px;
		padding: 12px;
		flex-wrap: nowrap;
	}

	.pd-download-btn {
		padding: 8px 12px 8px 10px;
		font-size: 12px;
	}

	.pd-group-title {
		font-size: 17px;
	}

	.pd-file-name {
		font-size: 13px;
	}
}

/* =============================================================
   RESPONSIVE — Mobile Portrait (≤ 480px)
   ============================================================= */
@media (max-width: 480px) {
	.pd-file-item {
		flex-wrap: wrap;
		align-items: flex-start;
		padding: 12px;
		gap: 8px;
	}

	.pd-file-icon {
		flex-shrink: 0;
		padding-top: 2px;
	}

	.pd-file-icon svg {
		width: 32px;
		height: 32px;
	}

	.pd-file-info {
		flex: 1;
		min-width: 0;
		width: auto;
	}

	.pd-download-btn {
		position: static;
		width: 100%;
		justify-content: center;
		padding: 9px 14px 9px 10px;
		font-size: 12px;
		order: 3;
	}

	.pd-group-title {
		font-size: 16px;
	}

	.pd-file-name {
		font-size: 13px;
	}

	.pd-btn-icon-only .pd-file-item {
		padding-bottom: 12px;
	}

	.pd-btn-icon-only .pd-download-btn {
		position: static;
		margin-left: auto;
		flex-shrink: 0;
	}

	.pd-btn-icon-only .pd-file-info {
		width: auto;
		flex: 1;
	}
}

/* =============================================================
   PREFER REDUCED MOTION
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
	.pd-animate .pd-file-item,
	.pd-animate .pd-group-title {
		animation: none;
	}

	.pd-file-item,
	.pd-download-btn,
	.pd-file-name {
		transition: none;
	}
}
