/*
 * Additions for WordPress/block output. The original class names are kept,
 * these rules only replace inline <style> blocks of the old templates and
 * neutralise default margins of editor paragraphs/headings.
 */

/* Was an inline <style> in the old footer */
.phone-link { color: white; text-decoration: none; }
.phone-link:hover { color: white; }

/* Was an inline <style> on the "O nás" page */
/* (higher specificity: nanogallery injects its theme CSS at runtime, after this file) */
.nGY2[class*="nanogallery_gallerytheme_light_my_nanogallery2"] .nGY2GThumbnail.nGY2GThumbnail_l1 { border: 10px solid #FFF; outline: 1px solid #EEE; }

/* Was an inline <style> on the "Starostlivosť" page */
@media only screen and (max-width: 640px) {
	.page-starostlivost .col3 { width: calc(100% - 30px); padding: 0; margin: 0; }
}

/* Paragraphs from the block editor inside the original containers */
.textblock > p:first-child, .textsideL > p:first-child,
.text2 > p:first-child, .boxik .textblock > p:first-child { margin-top: 0; }
.textblock > p:last-child, .textsideL > p:last-child, .text2 > p:last-child { margin-bottom: 0; }
.textsideL > h3:first-child { margin-top: 0; }

/* Former inline styles of headings */
.col3b > h3:first-child { margin-top: 0; }
.col3 .thumb3 + h2 { margin-bottom: 15px; }
.boxik h2 { margin: 30px 0 15px 0; }

/* Home page cards: text under the heading (was style="min-height:120px") */
.iconA ~ h3 + p { min-height: 120px; margin-top: 0; }

/* Headings with an anchor: keep them below the sticky .altmenu when jumping */
h2[id], h3[id] { scroll-margin-top: 60px; }

/* Screen-reader text (WordPress core class) */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Price list (Cenník) */
.cennikwrap { overflow-x: auto; max-width: 900px; margin: 0 0 10px; }
.cennik { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 21px; }
.cennik td { padding: 11px 10px; border-bottom: 1px solid #EDEDED; vertical-align: baseline; }
.cennik tr:first-child td { border-top: 1px solid #EDEDED; }
.cennik tr:nth-child(even) td { background: #FAFAFA; }
.cennik .cennik_name { color: #555; }
.cennik .cennik_price { text-align: right; white-space: nowrap; font-weight: bold; color: #333; width: 1%; padding-left: 30px; }
.cennik .cennik_od { font-weight: normal; font-size: 13px; color: #999; }
@media only screen and (max-width: 640px) {
	.cennik td { padding: 9px 4px; font-size: 14px; }
	.cennik .cennik_price { padding-left: 12px; white-space: normal; min-width: 70px; }
}

/* Cookie banner (GDPR) */
.cookiebar[hidden] { display: none; }
.cookiebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; padding: 0 15px calc(15px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.cookiebar_in { pointer-events: auto; max-width: 1100px; margin: 0 auto; background: #FFF; color: #555; border-radius: 6px; box-shadow: 0 4px 30px rgba(0,0,0,.25); padding: 20px 25px; font: 14px/21px Verdana, Arial, Helvetica, sans-serif; border-top: 4px solid #0DB4E9; }
.cookiebar_title { font-size: 18px; color: #0DB4E9; margin-bottom: 6px; }
.cookiebar_text { margin: 0 0 14px; }
.cookiebar_text a { color: #0073aa; text-decoration: underline; }
.cookiebar_opts { margin: 0 0 14px; display: grid; gap: 8px; }
.cookiebar_opts[hidden] { display: none; }
.cookiebar_opt { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cookiebar_opt input { width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 auto; }
.cookiebar_btns { display: flex; flex-wrap: wrap; gap: 10px; }
.cookiebar_btn { font: bold 14px/1 Verdana, Arial, sans-serif; padding: 13px 22px; border-radius: 3px; cursor: pointer; border: 1px solid #0DB4E9; letter-spacing: .5px; }
.cookiebar_btn[hidden] { display: none; }
.cookiebar_accept, .cookiebar_reject, .cookiebar_save { background: #0DB4E9; color: #FFF; }
.cookiebar_accept:hover, .cookiebar_reject:hover, .cookiebar_save:hover { background: #027FCA; border-color: #027FCA; }
.cookiebar_set { background: #FFF; color: #0DB4E9; }
.cookiebar_btn:focus-visible { outline: 3px solid #1E73BE; outline-offset: 2px; }
.copyright .cookiebar_open { color: inherit; text-decoration: underline; margin-left: 15px; }
@media only screen and (max-width: 640px) {
	.cookiebar_in { padding: 16px; font-size: 13px; line-height: 19px; }
	.cookiebar_btn { flex: 1 1 100%; padding: 13px 10px; }
}

/* Subpages (Ošetrenia) */
.dental_subpage_title a { color: inherit; text-decoration: none; }
.dental_subpage_title a:hover { color: #1E73BE; }
.textblock .dental_more { white-space: nowrap; color: #0DB4E9; font-weight: bold; text-decoration: none; }
.textblock .dental_more:hover { text-decoration: underline; }
.anchormenu a.sel { color: #555; cursor: default; }
.anchormenu a.sel span { opacity: 1 !important; }

/* Main menu: submenu (e.g. Ošetrenia → treatments) */
.menu_has_sub { position: relative; display: inline-block; }
.mainmenu .menu_has_sub > a, .altmenu .menu_has_sub > a { padding-right: 26px; }
.submenu_toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 20px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.submenu_toggle::before { content: ""; display: block; margin: 0 auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; opacity: .7; }
.menu_has_sub > a.sel + .submenu_toggle { color: #FFF; }
.menu_has_sub.open > .submenu_toggle::before { transform: translateY(1px) rotate(-135deg); }
.submenu_toggle:focus-visible { outline: 2px solid #1E73BE; outline-offset: 1px; }
.menu_has_sub .submenu { display: none; position: absolute; left: 0; top: 100%; min-width: 270px; background: #FFF; box-shadow: 0 8px 24px rgba(0,0,0,.15); border-top: 3px solid #0DB4E9; z-index: 600000; text-align: left; padding: 6px 0; }
.menu_has_sub:hover > .submenu, .menu_has_sub:focus-within > .submenu, .menu_has_sub.open > .submenu { display: block; }
.mainmenu .submenu a, .altmenu .submenu a { display: block; padding: 10px 20px; margin: 0; text-transform: none; font-size: 13px; line-height: 17px; color: #333; white-space: nowrap; background: none; }
.mainmenu .submenu a:hover, .altmenu .submenu a:hover { background: #F2FAFD; color: #0DB4E9; }
.mainmenu .submenu a.sel, .altmenu .submenu a.sel { background: #F2FAFD; color: #0DB4E9; font-weight: bold; }
@media only screen and (max-width: 1000px) {
	.menu_has_sub { display: block; }
	/* The fixed mobile menu scrolls inside the screen when it gets taller (open submenu). */
	.mainmenu { max-height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
	.mainmenu .menu_has_sub > a { padding-right: 80px; width: calc(100% - 110px); }
	.submenu_toggle { right: 20px; top: 4px; transform: none; width: 48px; height: 48px; } /* pinned to the row, not the open list */
	.menu_has_sub:hover > .submenu, .menu_has_sub:focus-within > .submenu { display: none; }
	.menu_has_sub.open > .submenu { display: block; }
	.menu_has_sub .submenu { position: static; min-width: 0; box-shadow: none; border-top: 0; padding: 0; background: #F7F7F7; }
	.mainmenu .submenu a { padding: 14px 30px 14px 50px; width: calc(100% - 80px); border-top: 0; border-bottom: 1px solid #E2E2E2; font-weight: normal; font-size: 14px; white-space: normal; }
	.mainmenu .submenu a.sel { font-weight: bold; }
}
