/**
 * Style dla widżetu Rodowód Psa (Dog Pedigree Widget)
 *
 * Ten plik zawiera wszystkie style CSS dla tabeli rodowodu
 * oraz lightbox do powiększania zdjęć.
 */

/* =============================================================================
   GŁÓWNY KONTENER
   ============================================================================= */

.dog-pedigree-wrapper {
	width: 100%;
	overflow-x: auto; /* Scroll poziomy na małych ekranach */
	margin: 20px 0;
}

/* =============================================================================
   TABELA RODOWODU
   ============================================================================= */

.dog-pedigree-table {
	width: 100%;
	min-width: 800px; /* Minimalna szerokość przed scrollem */
	border-collapse: collapse;
	font-family: Arial, sans-serif;
	font-size: 14px;
	table-layout: fixed;
}

.dog-pedigree-table td {
	border: 1px solid #333;
	padding: 8px 10px;
	text-align: center;
	vertical-align: middle;
}

/* =============================================================================
   KOLORY DLA PŁCI
   Domyślne kolory - można zmienić w panelu Elementor
   ============================================================================= */

.dog-pedigree-table .male {
	background-color: #e3f2fd; /* Jasny niebieski */
}

.dog-pedigree-table .female {
	background-color: #fce4ec; /* Jasny różowy */
}

/* =============================================================================
   STYLE DLA POKOLEŃ (szerokość kolumn)
   ============================================================================= */

.dog-pedigree-table .gen1 {
	width: 18%;
	font-weight: bold;
	font-size: 1.1em;
}

.dog-pedigree-table .gen2 {
	width: 20%;
	font-weight: bold;
}

.dog-pedigree-table .gen3 {
	width: 26%;
}

.dog-pedigree-table .gen4 {
	width: 36%;
	font-size: 0.9em;
}

/* =============================================================================
   ZAWARTOŚĆ KOMÓRKI
   ============================================================================= */

/* Imię psa */
.dog-pedigree-table .dog-name {
	display: block;
	font-weight: 500;
	margin-top: 4px;
}

/* Tytuły psa */
.dog-pedigree-table .dog-titles {
	display: block;
	font-size: 0.85em;
	color: #666;
	font-style: italic;
	margin-bottom: 2px;
}

/* =============================================================================
   MINIATURA ZDJĘCIA
   ============================================================================= */

.dog-pedigree-table .dog-thumbnail {
	width: 50px;
	height: 50px;
	object-fit: cover; /* Przycina zdjęcie do kwadratu */
	border-radius: 4px;
	border: 1px solid #ccc;
	margin-bottom: 5px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dog-pedigree-table .dog-thumbnail:hover {
	transform: scale(1.1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dog-pedigree-table .dog-lightbox-trigger {
	display: inline-block;
	text-decoration: none;
}

/* =============================================================================
   LIGHTBOX (powiększone zdjęcie)
   ============================================================================= */

.dog-pedigree-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Ciemne tło za zdjęciem */
.dog-pedigree-lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.85);
	cursor: pointer;
}

/* Kontener na zdjęcie */
.dog-pedigree-lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	z-index: 1;
}

/* Powiększone zdjęcie */
.dog-pedigree-lightbox-image {
	max-width: 100%;
	max-height: 85vh;
	display: block;
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Przycisk zamknij (X) */
.dog-pedigree-lightbox-close {
	position: absolute;
	top: -40px;
	right: -10px;
	width: 36px;
	height: 36px;
	background-color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 24px;
	font-weight: bold;
	color: #333;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.2s ease;
	line-height: 1;
	padding: 0;
}

.dog-pedigree-lightbox-close:hover {
	background-color: #f44336;
	color: #fff;
	transform: scale(1.1);
}

/* =============================================================================
   RESPONSYWNOŚĆ
   ============================================================================= */

/* Tablety */
@media screen and (max-width: 1024px) {
	.dog-pedigree-table {
		font-size: 13px;
	}

	.dog-pedigree-table td {
		padding: 6px 8px;
	}

	.dog-pedigree-table .dog-thumbnail {
		width: 40px;
		height: 40px;
	}
}

/* Telefony */
@media screen and (max-width: 768px) {
	.dog-pedigree-table {
		font-size: 12px;
		min-width: 700px;
	}

	.dog-pedigree-table td {
		padding: 5px 6px;
	}

	.dog-pedigree-table .dog-thumbnail {
		width: 35px;
		height: 35px;
	}

	.dog-pedigree-table .gen1 {
		font-size: 1em;
	}

	.dog-pedigree-table .gen4 {
		font-size: 0.85em;
	}
}

/* Małe telefony */
@media screen and (max-width: 480px) {
	.dog-pedigree-table {
		font-size: 11px;
		min-width: 600px;
	}

	.dog-pedigree-table td {
		padding: 4px 5px;
	}

	.dog-pedigree-table .dog-thumbnail {
		width: 30px;
		height: 30px;
	}
}
