:root {
    --accent: #e7b519;
    --background: #dedede;
    --text: #ffffff;
    --shadow: #000000;
    --font-size: 6vh;
}

@font-face {
	font-family: 'Open Sans';
    src: url(assets/font/open-sans.woff2) format('woff2');
	font-style: normal;
	font-weight: 400 700;
    font-display: block;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    font-stretch: 100%;
    font-optical-sizing: auto;
}

* {
    margin: 0;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-style: normal;
    /* font-variation-settings:
        "wdth" 100; */
}

:not(footer) :focus {
    box-shadow: 0 0 0 3px var(--accent);
    outline: none;
}


html.default[data-currency="ITL"] body {
    background: url("assets/img/itl.jpg") no-repeat scroll center top/cover var(--background);
    background-position: left 10% bottom 20%;
}

html.default[data-currency="USD"] body {
    background: url("assets/img/usd.jpg") no-repeat scroll center top/cover var(--background);
    background-position: left 20% top 20%;
}

html.default[data-currency="FRF"] body {
    background: url("assets/img/frf.jpg") no-repeat scroll center top/cover var(--background);
    background-position: center 10%;
}

html.default[data-currency="DEM"] body {
    background: url("assets/img/dem.jpg") no-repeat scroll center top/cover var(--background);
    background-position: right 10% top 0;
}

html.default[data-currency="ESP"] body {
    background: url("assets/img/esp.jpg") no-repeat scroll center top/cover var(--background);
    background-position: right 10% top 0;
}

html.default[data-currency="CHF"] body {
    background: url("assets/img/chf.webp") no-repeat scroll center top/cover var(--background);
    background-position: center top 17%;
}

html.default[data-currency="TRY"] body {
    background: url("assets/img/try.webp") no-repeat scroll center top / cover var(--background);
    background-position: center center;
}

html.default[data-currency="ARS"] body {
    background: url("assets/img/ars.jpg") no-repeat scroll center top / cover var(--background);
    background-position: center center;
}

html.default[data-currency="GBP"] body, html.default[data-currency="CAD"] body, html.default.notfound body {
    background: url("assets/img/weimar_hyperinflation_web.jpg") no-repeat scroll center top / cover var(--background);
    background-position: 70% 30%;
}

html.default body {
    color: var(--text);
    background-position: 60% 30%;
    position: relative;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
}

html.default body, #content::before {
    transition: background 0.5s ease-in-out;
}

html.default,
html.default body {
    display: table;
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    overscroll-behavior: none;
    overflow:hidden
}

strong {
    font-weight: 700;
}

ul {
    padding: 0;
    list-style-type: none;
}

a,
a:active,
a:visited {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

a.active {
    border-bottom: none;
}

a:hover {
    border-bottom: 1px dashed var(--accent);
}

.default #container {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

#content,
#content>* {
    display: flex;
    font-size: var(--font-size);
    font-weight: 700;
    line-height: 1.5em;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100vw;
    box-sizing: border-box;
    flex-direction: column;
}

#content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

html.default[data-currency="ITL"] #content::before {
    /* background: linear-gradient(120deg, transparent, rgba(0, 0, 0, .75)), */
    /* background: linear-gradient(120deg, transparent, #27468e) */
    background: linear-gradient(55deg, transparent, rgb(39 70 142 / 80%)), rgba(39, 70, 142, 0.7);
}

html.default[data-currency="USD"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(54 94 33 / 80%)), rgba(142, 92, 39, 0.7)
}

html.default[data-currency="FRF"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(94 33 69 / 80%)), rgba(142, 92, 39, 0.7)
}

html.default[data-currency="DEM"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(38 64 135 / 80%)), rgb(104 39 39 / 70%)
}

html.default[data-currency="ESP"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(94 87 33 / 80%)), rgb(39 106 142 / 70%)
}

html.default[data-currency="GBP"] #content::before, html.default[data-currency="CAD"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(137 60 4 / 80%)), rgb(39 104 91 / 70%)
}

html.default[data-currency="CHF"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(39 104 91 / 80%)), rgb(39 104 91 / 70%)
}

html.default[data-currency="ARS"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(52 144 233 / 80%)), rgb(119 26 115 / 70%)
}

html.default[data-currency="TRY"] #content::before {
    background: linear-gradient(55deg, transparent, rgb(68 67 112 / 80%)), rgba(220, 33, 33, 0.7)
}

html.default.notfound #content::before {
    background: linear-gradient(120deg, transparent, rgba(0, 0, 0, .8));
}

#highlight {
    border-bottom: 2px solid var(--accent);
}

select#anno {
    margin: 0 1rem;
}

input,
select {
    font-size: 100%;
    text-align: center;
    text-align-last: center !important; /* Safari iOS fix */
    background-color: rgba(238, 238, 238, .9);
    border: 0 none;
    max-width: 90vw;
    padding: 0;
    transition: box-shadow 0.3s ease;
}

#risultato {
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 20px;
    border: 2px solid var(--accent);
    min-height: calc(var(--font-size) * 1.5 + 14px); /* avoids layout shift */
}

#inflation-rate {
    line-height: 0;
    font-size: .8rem;
}

#calculator {
    position: relative;
}

*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* share */

.share {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s linear;
    margin: 0 auto;
    width: auto;
    max-width: 90vw;
    position: absolute;
    bottom: -40px;
    text-shadow: none;
    display: flex;
    justify-content: center;
    line-height: .9rem;
}

.share-container {
    border-radius: 15px;
    display: flex;
    text-align: center;
    transition: width 0.5s;
    width: 80px;
    background-color: rgb(222 222 222 / 80%);
    mix-blend-mode: hard-light;
}

.share-container.active {
    width: 100%;
}

.share-btn {
    width: 90px;
    padding: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--shadow);
    border-radius: 15px;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.share-btn:hover {
    opacity: .8;
    cursor: pointer;
}

.share-btn.active {
    color: var(--text);
    background-color: var(--shadow);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.share-url {
    width: 0;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    font-size: 10px;
    color: #eeeeee;
    transition: all 0.2s;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    text-overflow: ellipsis
}

.share-url.active {
    width: 100%;
    color: var(--shadow);
    padding: 5px
}

/*fade*/
.animate {
    opacity: 0;
    transition: all 1s;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

.animate.active {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%);
}

.slide-in-down {
    transform: translateY(-100%) translateX(-50%);
}

/*notification*/
.notification-button {
    position: fixed;
    top: 40px;
    left: 50%;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text);
    border-radius: 5px;
    font-size: 1rem;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.default footer {
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 12px;
    text-align: right;
    background: rgba(0, 0, 0, .5);
    padding: 10px;
}

footer,
footer a {
    font-weight: 400;
}

.flags-container {
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 999;
    display: flex;
    gap: 10px;
    font-size: 12px;
}

/* chart */
#inflation-chart {
    width: 100vw;
    height: 100dvh;
    visibility: hidden;
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    transition: visibility 0s linear 0.5s, opacity 0.5s ease;
    opacity: 0;
}

#inflation-chart.visible {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

a#open-chart {
    cursor:pointer
}

button#close-chart {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    stroke: currentColor;
    cursor: pointer;
    padding: 5px;
}

button#close-chart svg:hover {
    fill: var(--accent);
    stroke: var(--accent);
}

/* blog */
.blog .container {
    width: 960px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    :root {
        --font-size: 5vh !important;
    }

    .flags-container {
        display: flex;
        right:0;
        gap: 12px;
        font-size: 16px;
        width: 100%;
        justify-content: space-around;
    }

    .flags-container a {
        padding: 10px;
        min-width: 48px;
        height: 48px;
    }

    select#currency {
        font-size: 4vh;
        text-align: center;
        text-align-last: center;
    }

    .share {
        top: -30px;
        bottom: unset;
    }
}