/* ================================================= */
/* VLASTNÍ KÓD PRO KARTU PSA (PILLOW GOLD)           */
/* Verze pro Shortcode                               */
/* ================================================= */
/*
 Theme Name:   ScapeShot Child
 Template:     scapeshot
 Version:      1.0.3
 Description:  Dceřina šablona pro ScapeShot pro vlastní úpravy.
*/

/* ======================================================== */
/* FINÁLNÍ ROZŠÍŘENÍ OBSAHU A OPRAVA PADDINGU PRO MOBILY   */
/* ======================================================== */

/* Cílíme na .wrapper POUZE pokud je uvnitř body, které obsahuje naši kartu */
/* Toto pravidlo je pro DESKTOP a větší zařízení */
body:has(.dog-profile-card) div#primary.content-area .site-content > .wrapper,
body:has(.dog-profile-card) .site-content > .wrapper {
    max-width: 1600px !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
}

/* Toto pravidlo je POUZE pro MOBILY */
@media screen and (max-width: 767px) {
    body:has(.dog-profile-card) div#primary.content-area .site-content > .wrapper,
    body:has(.dog-profile-card) .site-content > .wrapper {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}


/* ================================================= */
/* VLASTNÍ STYLY PRO KARTU PSA                       */
/* ================================================= */

/* Cílení na hlavní kontejner a reset vnitřních mezer */
.dog-profile-card {
    background-color: #333333;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 1px solid #444;
    margin: 2em 0 !important;
    padding: 0 !important;
    overflow: hidden;
}
/* Cílení na automaticky generovaný vnitřní kontejner WordPressu */
.dog-profile-card > .wp-block-group__inner-container > * {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Hlavička a její prvky */
.dog-profile-card .dog-header {
    background-color: #1e1e1e;
    padding: 30px;
    text-align: center;
}
.dog-profile-card h1, .dog-profile-card h2, .dog-profile-card h3, .dog-profile-card p {
    font-family: 'Poppins', sans-serif;
}
.dog-profile-card h1 { font-size: 2.2em; line-height: 1.3; margin: 0; color: #ffffff; font-weight: 700; }
.dog-profile-card p.nickname {
    font-size: 1.6em; margin-top: 10px; color: #adb5bd; font-weight: 300; margin-bottom: 0;
}

/* Obecné sekce a jejich nadpisy */
.dog-profile-card .dog-section {
    padding: 25px 30px;
    border-bottom: 1px solid #444;
}
.dog-profile-card > .wp-block-group__inner-container > .dog-section:last-of-type,
.dog-profile-card > .wp-block-group__inner-container > .wp-block-group:last-child > .dog-section {
    border-bottom: none;
}
.dog-profile-card .dog-section h2 {
    font-size: 1.8em; color: #ff8605; margin: 0 0 25px 0;
    padding-bottom: 10px; border-bottom: 2px solid #ff8605; font-weight: 700;
}

/* Ostatní prvky */
.dog-profile-card p { color: #cccccc; font-size: 1em; }
.dog-profile-card a { color: #ff8605; text-decoration: none; }
.dog-profile-card a:hover { color: #fcb900; }

/* Tabulky */
.dog-profile-card .info-table,
.dog-profile-card .pedigree-table {
    width: 100%; border-collapse: collapse;
}
.dog-profile-card .info-table td,
.dog-profile-card .pedigree-table td {
    border: 1px solid #555; padding: 12px; vertical-align: top;
}
.dog-profile-card .info-table td:first-child { width: 35%; }
.dog-profile-card .pedigree-table td:first-child {
    background-color: #444; vertical-align: middle; text-align: center;
}

/* Vysvětlivky */
.dog-profile-card .abbreviations dl {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px 25px; padding: 0; margin: 0;
}
.dog-profile-card .abbreviations dt { font-weight: bold; color: #ff8605; }
.dog-profile-card .abbreviations dd { margin-left: 0; padding-bottom: 5px; }


/* ================================================= */
/* RESPONZIVNÍ STYLY PRO MOBILNÍ ZAŘÍZENÍ            */
/* ================================================= */
@media screen and (max-width: 767px) {
    /* Oprava paddingu wrapperu pro mobily */
    .entry-content:has(.dog-profile-card) {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Úpravy písma a mezer v kartě */
    .dog-profile-card .dog-section { padding: 20px 7px !important; }
    .dog-profile-card h1 { font-size: 1.8em !important; }
    .dog-profile-card p.nickname { font-size: 1.3em !important; }
    .dog-profile-card .dog-section h2 { font-size: 1.5em !important; }
    .dog-profile-card p,
    .dog-profile-card .info-table td,
    .dog-profile-card .pedigree-table td { font-size: 0.95em !important; }
    
    /* Oprava zalamování slov */
    .dog-profile-card, .dog-profile-card * {
        word-wrap: break-word !important;
        word-break: normal !important;
    }
    
	/* Úprava tabulek informací PRO MOBILY */
	.dog-profile-card .info-table td {
		font-size: 0.9em !important;
		padding-top: 8px !important;
		padding-bottom: 8px !important;
	}
	.dog-profile-card .info-table td:first-child {
		width: 40% !important;
		padding-right: 10px !important;
	}
    
/* --- FINÁLNÍ ÚPRAVA RODOKMENU S MANUÁLNÍM BARVENÍM --- */
.dog-profile-card .pedigree-table,
.dog-profile-card .pedigree-table tbody,
.dog-profile-card .pedigree-table tr,
.dog-profile-card .pedigree-table td {
    display: block !important;
    width: 100% !important;
}
.dog-profile-card .pedigree-table tr {
    padding: 0 !important;
    border-bottom: none !important;
    background-color: transparent !important;
}
.dog-profile-card .pedigree-table td {
    border: none !important;
    padding: 12px 15px !important;
    text-align: left !important;
    border-bottom: 1px solid #444; /* Linka mezi každým předkem */
}
.dog-profile-card .pedigree-table tr:last-child td:last-child {
    border-bottom: none !important;
}

/* Toto je klíčová změna: Obarvíme pouze buňky s naší třídou */
.dog-profile-card .pedigree-table td.pedigree-odd {
    background-color: #2a2a2a !important;
}

.dog-profile-card .pedigree-name {
    font-weight: bold;
}
.dog-profile-card .pedigree-titles {
    font-size: 0.8em;
    font-style: italic;
    color: #adb5bd;
}

/* Odsazení pro jednotlivé generace */
.dog-profile-card .pedigree-table td[rowspan="4"] {
    padding-left: 15px !important;
    font-size: 1.1em !important;
    color: #ff8605;
    background-color: transparent !important; /* Hlavní pes je vždy světlý */
}
.dog-profile-card .pedigree-table td[rowspan="2"] {
    padding-left: 30px !important;
}
.dog-profile-card .pedigree-table td:not([rowspan]) {
    padding-left: 45px !important;
}

	/* Úprava vysvětlivek */
	.dog-profile-card .abbreviations dl { display: block !important; }
	.dog-profile-card .abbreviations dl > div { display: flex !important; align-items: flex-start; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #444; }
	.dog-profile-card .abbreviations dl > div:last-child { border-bottom: none; margin-bottom: 0; }
	.dog-profile-card .abbreviations dt { flex: 0 0 70px; padding-right: 10px; }
	.dog-profile-card .abbreviations dd { flex: 1; margin: 0; padding: 0; }
}