html {
    margin-top: 0 !important;
}

:root {
    --dropShadow: drop-shadow(0px 8px 8px rgba(0, 0, 0, 0.3));
}

.leaflet-tooltip {
    padding: 6px 12px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
    border: none !important;
}

/* Pulzáló ikon */
.pulsing {
    clip-path: circle(0% at 16% 84%);
    animation: pulsing infinite 2s;
    opacity: 1;
}

@keyframes pulsing {
    0% {
        clip-path: circle(0% at 16% 84%);
        opacity: 1;
    }

    20% {
        clip-path: circle(0% at 16% 84%);
        opacity: 1;
    }

    80% {
        clip-path: circle(150% at 16% 84%);
        opacity: 1;
    }

    100% {
        clip-path: circle(150% at 16% 84%);
        opacity: 0;
    }
}

/* Töltés indikátor */
.circularprogressindicator {
    pointer-events: none;
    animation: circularprogressindicator-rotate 2s linear infinite;
    aspect-ratio: 1;
}

.circularprogressindicator .path {
    stroke-linecap: butt;
    animation: circularprogressindicator-dash 1.5s ease-in-out infinite;
}

@keyframes circularprogressindicator-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes circularprogressindicator-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Maszkolás */
.mask-bottom-fade {
    background-color: var(--background);
    mask-image: linear-gradient(to bottom, var(--background) 0, var(--background) calc(100% - 15px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, var(--background) 0, var(--background) calc(100% - 15px), transparent 100%);
}

.mask-vertical-fade {
    background-color: var(--background);
    mask-image: linear-gradient(to bottom, transparent 0, var(--background) 15px, var(--background) calc(100% - 15px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, var(--background) 15px, var(--background) calc(100% - 15px), transparent 100%);
}

/* Formázott tartalom */
.formatted {
    line-height: 1.5;
    font-weight: 400;
}

.formatted:not(.disable-select) * {
    user-select: text;
    -webkit-user-select: text;
}

.formatted section *,
.formatted a.button *,
.formatted a.button {
    user-select: none !important;
    -webkit-user-select: none !important;
}

.formatted p strong {
    font-weight: 600;
}

.formatted h1,
.formatted h2,
.formatted h3,
.formatted h4,
.formatted h5,
.formatted h6 {
    color: var(--on-surface-tint);
    margin: 1.6em 0 0.8em 0;
}

.formatted p.info,
.formatted p.warning,
.formatted p.important {
    box-sizing: border-box;
    padding: 10px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    padding-left: 42px;
}

.formatted p.info {
    background-color: color-mix(in srgb, var(--blue), transparent 80%);
}

.formatted p.warning {
    background-color: color-mix(in srgb, var(--rose), transparent 80%);
}

.formatted p.important {
    background-color: color-mix(in srgb, var(--amber), transparent 80%);
}

.formatted p.info::before,
.formatted p.warning::before,
.formatted p.important::before {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-family: "Material Icons";
    font-weight: 400;
    font-size: 24px;
    padding: 4px;
    height: 100%;
    box-sizing: border-box;
    color: white;
}

.formatted p.info::before {
    background-color: var(--blue);
    content: 'info_outline';
}

.formatted p.warning::before {
    background-color: var(--rose);
    content: 'report_problem';
}

.formatted p.important::before {
    background-color: var(--amber);
    content: 'flag';
}

.formatted aside {
    display: none;
}

.formatted section {
    width: calc(100% + 20px);
    transform: translateX(-10px);
    transition: all ease 300ms;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--action);
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
}

.formatted section * {
    pointer-events: none;
    font-weight: 600;
}

.formatted section:hover {
    background-color: #00000004;
}

.formatted section:active {
    background-color: #f0f0f0;
}

.formatted section::before {
    transition: all ease 300ms;
    content: 'expand_circle_down';
    font-family: "Material Icons";
    font-weight: 400;
    font-size: 24px;
    rotate: -90deg;
}

.formatted section+p {
    transition: all ease 300ms;
    border-left: 2px dashed var(--action);
    margin: 4px 8px 4px 11px;
    padding-left: 20px;
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
    overflow: hidden;
}

.formatted section+table {
    border: none !important;
    border-left: 2px dashed var(--action) !important;
    margin: 4px 8px 4px 21px;
    padding: 0 0 0 20px;
    font-weight: unset;
    max-width: calc(100% - 30px);
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
    overflow: hidden;
    font-size: unset;
    width: 100%;
    table-layout: auto;
    overflow: hidden;
    white-space: unset;
    transform: none;
    mask-image: none;
    -webkit-mask-image: none;
}

.formatted section+table>tbody>tr:first-of-type>td {
    border: none !important;
}

.formatted section+table>tbody>tr:first-of-type {
    background-color: var(--background) !important;
}

.formatted section+table>tbody {
    width: 100%;
}

.formatted section+table figure {
    margin: 40px auto 80px auto;
}

.formatted section+table>tbody>tr:first-of-type {
    background-color: var(--background);
}

.formatted section+p br {
    margin-bottom: 1em;
    display: block;
    content: " "
}

.formatted section[data-open="true"]::before {
    rotate: 0deg;
}

.formatted section[data-open="true"]+p,
.formatted section[data-open="true"]+table {
    max-height: unset;
    opacity: 1;
    transform: none;
    margin: 8px 8px 16px 11px;
    overflow: visible;
}

.formatted img {
    transition: all ease 300ms;
    max-width: min(600px, 100%);
    filter: var(--dropShadow);
    cursor: pointer;
    display: block;
    margin: auto;
}

.formatted :not(figure) img {
    margin: 40px auto;
}

.formatted figure {
    aspect-ratio: 3/2;
    position: relative;
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 80px auto 40px auto;
    color: #ffffff00;
}

.formatted figure img {
    aspect-ratio: 3/2;
    object-fit: cover;
    width: 100%;
    max-width: 600px;
    filter: var(--dropShadow);
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    opacity: 0;
    transform-origin: top center;
    cursor: pointer;
}


.formatted figure img:nth-of-type(1),
.formatted figure img:nth-of-type(2),
.formatted figure img:nth-of-type(3) {
    opacity: 1;
}

.formatted figure img:nth-of-type(1) {
    z-index: 2;
}

.formatted figure img:nth-of-type(2) {
    z-index: 1;
}

.formatted figure img:nth-of-type(2) {
    translate: 0 -5%;
    scale: .9;
}

.formatted figure img:nth-of-type(3) {
    translate: 0 -10%;
    scale: .8;
}

.formatted figure:hover img:nth-of-type(1) {
    translate: 0 5%;
}

.formatted figure:hover img:nth-of-type(3) {
    translate: 0 -15%;
}

.formatted table {
    font-size: 14px;
    padding: 0 15px 0 15px;
    width: calc(100% + 30px);
    table-layout: auto;
    border-collapse: collapse;
    margin: 1em auto;
    display: block;
    overflow-x: scroll;
    white-space: nowrap;
    transform: translateX(-15px);
    mask-image: linear-gradient(to left, transparent 0, var(--background) 15px, var(--background) calc(100% - 15px), transparent 100%);
    -webkit-mask-image: linear-gradient(to left, transparent 0, var(--background) 15px, var(--background) calc(100% - 15px), transparent 100%);
}

.formatted table tbody {
    min-width: min(100%, 600px);
    margin: 0 auto;
    display: table;
    white-space: normal;
}

.formatted table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.formatted table tr:nth-of-type(odd) {
    background-color: #00000004;
}

.formatted table tr:first-of-type {
    background-color: var(--surface-tint) !important;
}

.formatted ol {
    counter-reset: item;
}

.formatted ol li,
.formatted ul li {
    display: block;
    position: relative;
    margin-top: .5em;
    margin-bottom: .5em;
}

.formatted ol li:before {
    position: absolute;
    left: 0;
    width: 40px;
    transform: translateX(-100%);
    text-align: right;
    padding-right: 8px;
    content: counter(item) ".";
    counter-increment: item;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

.formatted ul li:before {
    position: absolute;
    left: 0;
    width: 40px;
    transform: translate(-100%, -2px);
    text-align: right;
    padding-right: 12px;
    content: "\2022";
    counter-increment: item;
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

.formatted iframe {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin: 1em auto;
    max-width: 100%;
    aspect-ratio: 16/9;
    display: inline-block;
}

.formatted a:not(.shortcode):not(.button) {
    transition: all ease 300ms;
    display: inline-block;
    font-weight: 600;
    color: var(--action);
    position: relative;
}

.formatted a:not(.shortcode):not(.button)::after {
    transition: all ease 300ms;
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--action);
    transform-origin: bottom left;
}

.formatted a:not(.shortcode):not(.button)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--action);
    opacity: 0.2;
}

.formatted a:not(.shortcode):not(.button):hover::after {
    transform: scaleX(1);
    transform-origin: bottom right;
}

/* Shortcode */

.formatted a.shortcode article {
    flex-direction: row-reverse;
    align-items: flex-end;
    color: var(--on-surface-soft) !important;
    padding-right: 20px;
    gap: 40px;
    border: 2px solid var(--outline);
}

.formatted a.shortcode article h3 {
    color: var(--on-surface-soft) !important;
}

.formatted a.shortcode article>div.rel:first-of-type {
    margin: 0;
    aspect-ratio: 1;
    align-self: flex-start;
    min-width: min(30vw, 220px);
    width: min(30vw, 220px);
}

.formatted a.shortcode article img {
    position: absolute !important;
    height: 100%;
    min-width: 100%;
    width: 100%;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 !important;
}

.formatted a.shortcode:hover article {
    background-color: var(--surface-tint);
    border-color: var(--surface-tint);
}

.formatted a.shortcode:active article {
    border-color: var(--primary-container);
}

.formatted a.shortcode:hover article img {
    min-width: 140%;
}

@media screen and (max-width: 500px) {
    .formatted a.shortcode article {
        margin-top: calc(20vw + 20px) !important;
        flex-direction: column;
        align-items: flex-start;
        padding-right: 0;
        gap: 0;
    }

    .formatted a.shortcode.noimage article {
        margin-top: 40px !important;
    }

    .formatted a.shortcode article>div.rel:first-of-type {
        width: max(150px, 40vw);
        height: 30vw;
        align-self: flex-end;
        margin-right: 10px;
    }

    .formatted a.shortcode article img {
        width: max(150px, 40vw);
        height: max(150px, 40vw);
        bottom: -10px;
    }
}

/* KATEGÓRIA RÉSZEK */
.formatted .categories-wrapper .category-box>.category-box-back {
    background-color: var(--accent-container);
    color: var(--on-accent-container);
}

.formatted .categories-wrapper .category-box>.category-box-back h4 {
    color: var(--on-accent-container) !important;
}

.formatted .categories-wrapper .category-box>.category-box-back button {
    --c: var(--accent);
}

.formatted .categories-wrapper .category-box:nth-child(2n)>.category-box-front {
    background-color: var(--primary-container);
    color: var(--on-primary-container);
}

.formatted .categories-wrapper .category-box:nth-child(2n + 1)>.category-box-front {
    background-color: var(--secondary-container);
    color: var(--on-secondary-container);
}

.formatted .categories-wrapper .category-box:nth-child(2n)>.category-box-front button {
    --c: var(--primary);
}

.formatted .categories-wrapper .category-box:nth-child(2n + 1)>.category-box-front button {
    --c: var(--secondary);
}

.formatted .categories-wrapper .category-box:nth-child(2n)>.category-box-front h3 {
    color: var(--on-primary-container);
}

.formatted .categories-wrapper .category-box:nth-child(2n + 1)>.category-box-front h3 {
    color: var(--on-secondary-container);
}

.formatted .categories-wrapper .category-box>.category-box-back {
    transform: rotateY(180deg);
}

.formatted .categories-wrapper .category-box>div {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.formatted .categories-wrapper .category-box {
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.formatted .categories-wrapper .category-box[data-flip="true"] {
    transform: rotateY(180deg) rotateZ(3deg) scale(1.2);
    z-index: 10;
}

.formatted .categories-wrapper {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(min(40vw, 175px), 1fr));
    justify-content: center;
    align-content: start;
}