/* CasaDeals Merkliste
---------------------------------------------------------- */

.cd-bookmark-button {
    position: relative;
    z-index: 4;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 34px;
    min-height: 34px;
    padding: 5px 7px;
    color: var(--color-secondary-text);
    cursor: pointer;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 999px;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.cd-bookmark-button:hover {
    color: var(--ghost-accent-color);
    background-color: rgb(0 0 0 / 0.045);
}

.cd-bookmark-button:focus-visible,
.cd-header-bookmarks:focus-visible {
    outline: 2px solid var(--ghost-accent-color);
    outline-offset: 2px;
}

.cd-bookmark-button:active {
    transform: scale(0.94);
}

.cd-bookmark-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.cd-bookmark-button.has-error {
    animation: cd-bookmark-shake 300ms ease-in-out;
}

.cd-bookmark-icon {
    display: block;
    width: 18px;
    height: 18px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill 160ms ease;
}

.cd-bookmark-button.is-saved {
    color: var(--ghost-accent-color);
}

.cd-bookmark-button.is-saved .cd-bookmark-icon {
    fill: currentColor;
}

.cd-bookmark-count {
    min-width: 0;
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Archive and related-post cards */

.gh-card.has-bookmark .gh-card-link {
    height: 100%;
}

.gh-card.has-bookmark .gh-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cd-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    margin-top: auto !important;
}

.cd-card-meta-left {
    display: inline-flex;
    min-width: 0;
    align-items: center;
}

.gh-card-meta .cd-bookmark-button {
    margin: -7px 0 -7px 0;
}

.gh-card-meta .cd-bookmark-icon {
    position: static;
    top: auto;
    display: block;
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Single post: country left, bookmark right */

.cd-post-country-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.cd-post-country-row .gh-article-tag {
    margin-bottom: 0;
}

.cd-post-country-row .cd-bookmark-button {
    margin: -7px -7px -7px 0;
}

/* Header: bookmark, search, menu */

.cd-navigation-mobile-tools,
.cd-navigation-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cd-header-bookmarks svg {
    width: 20px;
    height: 20px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (min-width: 768px) {
    .cd-navigation-mobile-tools {
        display: none;
    }
}

@media (max-width: 767px) {
    .gh-navigation-actions .cd-navigation-tools {
        display: none;
    }
}

/* Personal bookmark page */

.cd-bookmark-page {
    margin-bottom: 80px;
}

.cd-bookmark-page .gh-container-title {
    display: block !important;
    margin-bottom: 32px;
    font-size: calc(3.4rem * var(--factor, 1));
    text-transform: none;
    border-bottom: 0;
}

.cd-bookmark-page .gh-main {
    min-width: 0;
}

.cd-bookmark-list[hidden] {
    display: none;
}

.cd-bookmark-message {
    margin: 0;
    padding: 16px 0 24px;
    color: var(--color-secondary-text);
}

.cd-bookmark-signin {
    margin-top: 20px;
}

@keyframes cd-bookmark-shake {
    0%, 100% {
        transform: translateX(0);
    }

    33% {
        transform: translateX(-3px);
    }

    66% {
        transform: translateX(3px);
    }
}

@media (max-width: 767px) {
    .cd-bookmark-page {
        margin-top: 40px;
        margin-bottom: 64px;
    }

    .cd-bookmark-page .gh-container-title {
        margin-bottom: 24px;
        font-size: 2.8rem !important;
    }

    .cd-bookmark-button {
        min-width: 38px;
        min-height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cd-bookmark-button,
    .cd-bookmark-icon {
        transition: none;
    }
}


/* Sold CasaDeals (#verkauft)
---------------------------------------------------------- */

.gh-card.is-sold .gh-card-image img,
.gh-article-image.is-sold img {
    filter: grayscale(70%);
    opacity: 0.78;
}

.gh-card.is-sold .gh-card-image,
.gh-article-image.is-sold {
    position: relative;
}

.cd-sold-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    background: #ea2611;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.cd-sold-badge-post {
    top: 16px;
    left: 16px;
    padding: 8px 13px;
    font-size: 1.3rem;
}

.cd-sold-notice {
    grid-column: main;
    width: 100%;
    margin-top: 20px;
    padding: 14px 16px;
    color: #ea2611;
    font-size: var(--content-font-size, 1.7rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
    background: #ffefea;
    border-radius: 8px;
}

.cd-sold-notice strong {
    font-weight: 700;
}

@media (max-width: 767px) {
    .cd-sold-badge {
        top: 9px;
        left: 9px;
        padding: 6px 9px;
        font-size: 1.1rem;
    }

    .cd-sold-badge-post {
        top: 12px;
        left: 12px;
        padding: 7px 10px;
        font-size: 1.2rem;
    }

    .cd-sold-notice {
        margin-top: 16px;
        padding: 12px 14px;
    }
}
