/**
 * Vlastní CSS úpravy - Geodézie Pleska
 *
 * Breakpointy:
 * - Desktop: výchozí
 * - Tablet: @media (max-width: 991px)
 * - Mobil: @media (max-width: 767px)
 *
 * Pro přepsání Brizy stylů použij !important
 */

/* === DESKTOP === */

/* Opakující se pozadí - topografický vzor na celou stránku */
/* Vzor je ZA vším obsahem, hero sekce ho překryje vlastním pozadím */
.brz-root__container {
    position: relative;
}

.brz-root__container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/wp-content/themes/blocksy-child/images/vzorek02.png');
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
    z-index: 0;
    pointer-events: none;
}

/* Zajistí že všechny sekce jsou NAD vzorem */
.brz-section {
    position: relative;
    z-index: 1;
}

/* Zelená ikona pro tlačítka s třídou btn-icon-color */
.btn-icon-color .brz-icon-svg {
    color: #84CE04 !important;
    fill: #84CE04 !important;
}

/* Podtržení pro tlačítka - všechna zobrazení */
.btn-link span,
.btn-icon-color span {
    text-decoration: underline !important;
}

/* Hover efekt pro link tlačítka - zelená barva */
.btn-link:hover span,
.btn-icon-color:hover span {
    color: #84CE04 !important;
}

.btn-icon-color:hover .brz-icon-svg {
    color: #84CE04 !important;
    fill: #84CE04 !important;
}

/* Obsahové odkazy (mimo header) - zelený hover #84CE04 */
.brz-section:not(.brz-section__header) .brz-rich-text a:hover {
    color: #84CE04 !important;
}

/* Menu odkazy - přesun underline z a na span (aby barva podtržení sledovala text) */
.brz .brz-menu .brz-menu__ul .brz-menu__item > .brz-a {
    text-decoration: none !important;
}

.brz .brz-menu .brz-menu__ul .brz-menu__item > .brz-a .brz-span {
    text-decoration: underline !important;
}

/* Header menu - BEZ underline */
.brz .brz-section__header .brz-menu .brz-menu__ul .brz-menu__item > .brz-a .brz-span {
    text-decoration: none !important;
}

/* Menu odkazy - zelený hover na všech breakpointech */
.brz .brz-menu .brz-menu__ul .brz-menu__item > .brz-a:hover .brz-span {
    color: #84CE04 !important;
}

/* Ceníková tabulka - zaoblené rohy */
/* Přidej třídu .price-table na tabulku nebo její kontejner v Brizy */
.price-table {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Badge "Autorizovaný zeměměřický inženýr" pod fotkou */
/* Přidej třídu .badge-autorizace na TEXT element v Brizy */

/* Wrapper - centrování celého elementu, záporný margin vytáhne badge přes fotku */
.badge-autorizace {
    text-align: center !important;
    margin-top: -85px !important;
    position: relative !important;
    z-index: 10 !important;
    display: flex !important;
    justify-content: center !important;
}

/* Brizy vnitřní wrappery - zmenšit na obsah */
.badge-autorizace > .brz-text,
.badge-autorizace > div {
    width: fit-content !important;
    max-width: fit-content !important;
    margin: 0 auto !important;
}

/* Rich-text kontejner - unified pill badge (i při 2 řádcích/2 odstavcích) */
.badge-autorizace .brz-rich-text {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    background-color: #F1FEF3 !important;
    padding: 6px 17px !important;
    width: fit-content !important;
    border-radius: 8px !important;
    cursor: default !important;
    text-align: center !important;
}

/* Odstavce uvnitř - bez vlastních mezer */
.badge-autorizace .brz-rich-text p {
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Span uvnitř - jen barva a font, bez vlastního pozadí */
.badge-autorizace .brz-rich-text p span,
.badge-autorizace .brz-rich-text span[class*="brz-cp"] {
    background-color: transparent !important;
    color: #015841 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: inline !important;
    cursor: default !important;
}
/* Kontaktní formulář - zaoblené rohy + fix skákání na hover (border 1px→2px) */
/* Vždy 2px border — v normálním stavu průhledný, na hover barva z Brizy */
.kontakt-form-radek input:not([type="checkbox"]):not([type="submit"]),
.kontakt-form-radek select,
.kontakt-form-radek textarea {
    border-radius: 10px !important;
    border-width: 2px !important;
}

/* Kontaktní formulář - focus stav: zelený border #84CE04 místo modrého outline */
.kontakt-form-radek input:not([type="checkbox"]):not([type="submit"]):focus,
.kontakt-form-radek input:not([type="checkbox"]):not([type="submit"]):focus-visible,
.kontakt-form-radek select:focus,
.kontakt-form-radek select:focus-visible,
.kontakt-form-radek textarea:focus,
.kontakt-form-radek textarea:focus-visible {
    border-color: #84CE04 !important;
    outline: none !important;
    box-shadow: none !important;
}
/* Textarea - přebití Brizy outline (vysoká specificita .brz .brz-forms2__item textarea) */
.brz .kontakt-form-radek .brz-forms2__item textarea.brz-textarea:focus,
.brz .kontakt-form-radek .brz-forms2__item textarea.brz-textarea:focus-visible {
    outline: none !important;
    border-color: #84CE04 !important;
}

/* Přechod 992–1100px: service karty z 4 sloupců na 2×2 grid */
/* Přidej třídu .sluzby-karty na ROW se 4 servisními kartami v Brizy editoru (Advanced → CSS Class) */
@media (max-width: 1100px) and (min-width: 992px) {
    .sluzby-karty .brz-columns {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* Wrap řádků + mezera mezi 1. a 2. řádkem karet */
    .sluzby-karty .brz-row {
        flex-wrap: wrap !important;
        row-gap: 30px !important;
    }

    /* Formulář - všechny položky na 100% šířku (přepíše Brizy inline styly) */
    .kontakt-form-radek .brz-forms2__item {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Kontaktní formulář - oprava šířky tří polí z 33% na přesnou třetinu */
/* Brizy zaokrouhluje na celá čísla, 3×33% = 99% → E-mail pole není zarovnané s krajem */
/* Přidej třídu .kontakt-form-radek na Form element v Brizy editoru (Advanced → CSS Class) */
/* Na 992–1100px se inputy zobrazují pod sebou (jako tablet) */
@media (min-width: 1101px) {
    .kontakt-form-radek .brz-forms2__item:nth-child(-n+3) {
        width: calc(100% / 3) !important;
        flex: 0 0 calc(100% / 3) !important;
        max-width: calc(100% / 3) !important;
    }
}

/* === TABLET === */
@media (max-width: 991px) {
    /* Badge autorizace - záporný margin přes fotku (jako na desktopu) */
    .badge-autorizace {
        margin-top: -90px !important;
    }
    .badge-autorizace .brz-rich-text {
        padding: 10px 14px !important;
    }
    .badge-autorizace .brz-rich-text p span,
    .badge-autorizace .brz-rich-text span[class*="brz-cp"] {
        font-size: 13px !important;
    }
}

/* GDPR souhlas - checkbox ve formuláři */
/* Text vedle checkboxu - dle Figma: Poppins Regular 16/24 #0E373C */
.gdpr-consent .brz-forms2__checkbox-option-name,
.gdpr-consent .gdpr-text {
    color: #0E373C !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 24px !important;
    white-space: normal !important;
    width: auto !important;
}

/* Odkaz na ochranu osobních údajů */
.js-privacy-link {
    color: #0E373C !important;
    text-decoration: underline !important;
    font-weight: 400 !important;
}

.js-privacy-link:hover {
    color: #84CE04 !important;
}

/* Schovat nativní input checkbox (vizuálně skrytý, ale funkční pro :checked + required validaci) */
.gdpr-consent input[type="checkbox"].brz-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 24px !important;
    height: 24px !important;
    pointer-events: none !important;
}

/* Schovat Brizy icon divy kompletně - nahrazujeme vlastním CSS checkboxem */
.gdpr-consent .brz-control__check-group-icon {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
}

/* Label - flex layout pro ::before (checkbox) + text */
.gdpr-consent .brz-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    cursor: pointer !important;
}

/* Vlastní checkbox přes ::before na labelu - nezaškrtlý (24x24px dle Figma) */
.gdpr-consent .brz-label::before {
    content: '' !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border: 2px solid #0E373C !important;
    border-radius: 7px !important;
    background-color: #fff !important;
    background-image: none !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    margin-top: 0px !important;
}

/* Zaškrtnutý stav - zelené pozadí + bílá fajfka (dle Figma) */
.gdpr-consent input[type="checkbox"]:checked + .brz-label::before {
    background-color: #015841 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z' fill='%23ffffff'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 16px !important;
    border-color: #015841 !important;
}

/* Odstranit extra margin na textu */
.gdpr-consent .brz-forms2__checkbox-option-name {
    margin-left: 0 !important;
}

/* Zmenšit klikatelnou oblast checkboxu - jen na checkbox + text */
.gdpr-consent .brz-control__check-group-option {
    width: fit-content !important;
    max-width: fit-content !important;
}

.gdpr-consent .brz-forms2__checkbox.gdpr-consent {
    width: fit-content !important;
}

.gdpr-consent .brz-control__check-group.brz-forms2__checkbox-options {
    width: fit-content !important;
}

/* Chybový stav checkboxu - červený rámeček + červený text při neodeslání formuláře */
.gdpr-consent .brz-label.gdpr-error::before {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 1px #e53e3e !important;
}

.gdpr-consent .brz-label.gdpr-error .brz-forms2__checkbox-option-name,
.gdpr-consent .brz-label.gdpr-error .js-privacy-link {
    color: #e53e3e !important;
}

/* === MOBIL === */
@media (max-width: 767px) {
    /* Badge autorizace - záporný margin přes fotku */
    .badge-autorizace {
        margin-top: -100px !important;
    }
    .badge-autorizace .brz-rich-text {
        padding: 6px 14px !important;
    }
    .badge-autorizace .brz-rich-text p span,
    .badge-autorizace .brz-rich-text span[class*="brz-cp"] {
        font-size: 14px !important;
    }

    /* GDPR checkbox - menší na mobilu */
    .gdpr-consent .brz-forms2__checkbox-option-name,
    .gdpr-consent .brz-control__check-group-option,
    .gdpr-consent .gdpr-text {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}
