figure.hasbadge {
    position:   relative;
}
figure.hasbadge figcaption {
    background-color: #fff;
    border-radius: 0px 0px 5px 5px;
    padding: 10px;
    margin-top: 0px;
    opacity: 1;
    border-top: 1px solid #fe5186;
    border-bottom: 1px solid #fe5186;
    border-left: 1px solid #fe5186;
    border-right: 1px solid #fe5186;
}

figure.hasbadge img {
    border-radius: 5px 5px 0px 0px;
    border-top: 1px solid #fe5186;
    border-left: 1px solid #fe5186;
    border-right: 1px solid #fe5186;
}

figure.hasbadge figcaption p {
    margin: 0px;
}

figure.post-cover {
    position: relative;
}

figure.post-cover .badge {
    position: absolute;
    color: black;
    opacity: 0.8;
    filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.6));
    right: 12px;
}

body.dark-theme figure.hasbadge  {
    color: black;
}

body.dark-theme .elevation-control {
    background-color: white;
}

.leaflet-map {
    border-top: 1px solid #fe5186;
    border-left: 1px solid #fe5186;
    border-right: 1px solid #fe5186;
    border-radius: 5px 5px 0px 0px;
}

.elevation-control {
    margin-top: 0px !important;
    margin-bottom: 0px;
    border-left: 1px solid #fe5186;
    border-right: 1px solid #fe5186;
}

#data-summary {
    margin-top: -12px ;
    border-radius: 0px 0px 5px 5px;
    border-bottom: 1px solid #fe5186;
    border-left: 1px solid #fe5186;
    border-right: 1px solid #fe5186;
    opacity: 1;
}

body.dark-theme #data-summary {
    color: black;
}

figure.post-cover .badge-time {
    top: 5px;
}

figure.post-cover .badge-length {
    top: 105px;
}

figure.post-cover .badge-ascent {
    top: 205px;
}

figure.post-cover .badge-speed {
    top: 305px;
}

.badge span.label {
    font-size: 0.9rem;
    position: absolute;
    top: 20px;
    right: 16px;
    width: 68px;
    text-align: center;
}
.badge span.value {
    font-size: 0.95rem;
    font-weight: bold;
    position: absolute;
    top: 44px;
    right: 5px;
    width: 90px;
    text-align: center;
}

@media (max-width: 500px) {
    .badge span.label {
        font-size: 0.75rem;
        right: 6px;
    }
    .badge span.value {
        font-size: 0.78rem;
        right: -6px;
    }

    figure svg {
        width: 80px;
    }
    figure.post-cover .badge-time {
        top: 0px;
    }

    figure.post-cover .badge-length {
        top: 80px;
    }

    figure.post-cover .badge-ascent {
        top: 160px;
    }

    figure.post-cover .badge-speed {
        top: 240px;
    }

    .data-summary {
        font-size: 12px;
    }

    .data-summary .data-row {
        margin-bottom: 0;
    }
    .data-summary .totlen, .data-summary .maxele, .data-summary .minele, .data-summary .avgsp, .data-summary .time, .data-summary .asc, .data-summary .desc, .data-summary, .download {
        display: block !important;
        margin-bottom: 0.5em;
    }
}

@media (max-width: 650px) {

    .elevation-control svg.background .legend {
        transform: translate(30px, 0px);
    }

    .elevation-control svg.background .legend > :nth-child(4) {
        transform: translate(120px, 130px);
    }

    .elevation-control svg.background > :first-child {
        transform: translate(50px, 20px);
    }

    .elevation-control svg {
        height: 170px;
    }

    .elevation-control {
        padding-bottom: 20px;
    }

    .cover-small-stats .stats-cell {
        font-size: 18px;
    }
}

.square-cover-container {
    width: 100%;
    padding-top: 100%;
    position:relative;
    overflow: hidden;
}

.cover-container {
    position:absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background-color:#fe5186;
    border: 1px solid #fe5186;
}

.cover-big-image {
    width: 100%;
    height: 100%;
    grid-column: span 2;
    grid-row: span 2;
}

.cover-small-image {
    width: 100%;
    height: 100%;
    background-color: white;
    position:relative;
}

.cover-small-image img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    max-width: 100%;
    height: auto;
}

.cover-small-stats {
    width: 100%;
    height: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
}
.cover-small-stats .stats-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fe5186;
    display: grid;
    gap: 1px;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
}

.cover-small-stats .stats-cell {
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: grid;
    grid-template-rows: 1fr 2fr;
    align-items: center;
    justify-items: center;
    font-size: 24px;
}

body.dark-theme .cover-small-stats .stats-cell, body.dark-theme .cover-small-image {
    background-color: #292a2d;
}

@media (max-width: 900px) {
    .cover-small-stats .stats-cell {
        font-size: 18px;
    }
}
@media (max-width: 600px) {
    .cover-small-stats .stats-cell {
        font-size: 14px;
    }
}
@media (max-width: 400px) {
    .cover-small-stats .stats-cell {
        font-size: 10px;
    }
}

.cover-small-stats .stats-label {
    grid-row: 1/2;
    align-self:center;
}

.cover-small-stats .stats-value {
    grid-row: 2 / 3;
    align-self: center;
    font-weight: bold;
}


.cover-big-image img, .cover-small-image img {
    border-radius: 0px;
}


.tag-cover {
    border: 1px solid #fe5186;
}

.tag-cover .container {
    position: relative;
    width: 100%;
    height: 100px;
    border-top: 1px solid #fe5186;
}
@media (max-width: 650px) {

    .tag-cover .container {
        height: 80px;
    }

    .tag-cover .stats-label {
        font-size: 12px !important;
    }

    .tag-cover .stats-cell {
        font-size: 18px !important;
        padding: 0px;
    }

    .tag-cover .stats-value svg {
        max-width: 30px;
    }
}

.tag-cover .stats-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fe5186;
    display: grid;
    gap: 1px;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr 1fr 1fr;
}

.tag-cover .stats-cell {
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: grid;
    grid-template-rows: 1fr 2fr;
    align-items: center;
    justify-items: center;
    font-size: 24px;
}

.tag-cover .stats-value {
    display: flex;
}

.tag-cover .stats-value span {
    margin-top: .5rem;
}

.tag-cover .stats-value svg {
    vertical-align: middle;
    padding-right: .5em;
}

.tag-cover .stats-label {
    color: #f4a259;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 16px;
    opacity: 0.8;

}

table.tag-posts {
    table-layout: auto;
    margin: 0px;
    padding-left: 1em;
    width: 100%;
}

table.tag-posts thead {
    font-weight: bold;
    color: #f4a259;
}

table.tag-posts td {
    border: 1px solid #fe5186;
}

#mc_embed_shell {
    margin-top: 5em;
}

.index-post-title {
    font-size: 1.5rem;
    margin-bottom: .5rem;
}

.index-post-title a {
    text-decoration: none;
}

.index-post-meta {
    display: flex;
    flex-wrap: wrap;
    margin-top: -1rem;
    margin-left: -2rem;
    padding-bottom: 1rem;
}

.index-post-meta .index-post-tags, .index-post-meta .index-post-date {
    margin-top: 1rem;
    margin-left: 2rem;
}

.index-post-meta .index-post-tags a {
    text-decoration: none;
    margin-top: -20px;
}

.index-post-tag svg, .index-post-tag a, .index-post-meta svg, .index-post-meta time, .index-post-stat svg, .index-post-stat span {
    vertical-align: middle;
}

.index-post-tag {
    background-color: #fe5186;
    color: white;
    padding: 0.4rem 0.5rem 0.6rem 0.5rem;
    margin-right: 0.5rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}
.index-post-tag:hover {
    background-color: #fe5186;
    color: #292a2d;
}


.index-post-stat svg {
    margin-right: -3px;
}

.index-post-stats {
    display: inline-flex;
    flex-wrap: wrap;
    margin-top: -0.5rem;
    margin-left: -1rem;
}

.index-post-stat {
    margin-top: .5rem;
    margin-left: 1rem;
}

.index-post-content {
    margin-top: 1.5rem;
    margin-bottom: .7rem;
}

.read-more.button {
    background-color: #fe5186;
    padding: .5rem 1rem;
    color: white;
    border-radius: 0px;
    max-width: none;
}

.read-more.button:hover {
    background-color: #fe5186;
    color: #292a2d;
    padding: .5rem 1rem;
}

.button-pink {
    background-color: #fe5186;
    color: #fff;
}


body.dark-theme #mc_embed_signup, body.dark-theme div.mce_inline_error, body.dark-theme .helper_text {
    background-color: #292a2d !important;

}