/* ==========================================================================
   Toplist Reviews Order - NDB
   Self-contained styles. Nothing here relies on the theme or on the original
   top-reviews-order plugin, so the cards render identically on their own.
   ========================================================================== */

.tlndb-list {
    margin: 20px 0;
}

.tlndb-box {
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    background-color: #f7f7f7;
    padding: 15px;
    margin-bottom: 30px;
}

.tlndb-box:last-child {
    margin-bottom: 0;
}

/* ---------- Title bar + rank ribbon ---------- */

.tlndb-title {
    position: relative;
    background-color: #BB0713;
    border-radius: 4px;
    color: #fff;
    padding: 10px 10px 10px 85px;
    margin-bottom: 10px;
    font-weight: 600;
}

.tlndb-title a:hover {
    color: #fff;
}

.tlndb-ribbon {
    position: absolute;
    z-index: 1;
    top: -4px;
    left: -25px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 32px;
    padding: 0 30px 2px 20px;
    background: #FFC801;
    color: #fff;
    font-size: 22px;
}

.tlndb-ribbon span {
    font-size: 14px;
    margin-left: -5px;
}

.tlndb-ribbon:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-right: 10px solid #BB0713;
    border-top: 15px solid transparent;
    border-bottom: 20px solid transparent;
}

.tlndb-ribbon:before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid #8c6e00;
    border-left: 10px solid transparent;
}

/* ---------- Banner + score badge ---------- */

.tlndb-image {
    position: relative;
    border-radius: 4px;
    /* Lets the badge size itself against the banner instead of the viewport. */
    container-type: inline-size;
}

.tlndb-image img {
    position: relative;
    width: 100%;
    height: auto;
}

/* The badge is a square laid over the circle baked into the banner.
   Offsets are measured from the artwork: the disc sits at 74.4%-97.5%
   horizontally and starts 0.6% down, for a diameter of 23.1% of the width.
   Everything is relative, so it stays locked to the circle at any size. */
.tlndb-rate {
    position: absolute;
    z-index: 2;
    top: 0.6%;
    right: 2.5%;
    width: 23.1%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    line-height: 1.25;
}

/* Capped at roughly eight CJK characters so the default label
   入金不要ボーナス評価 breaks between the two words, not mid-word. */
.tlndb-rate p {
    max-width: 8.4em;
    margin: 0 0 0.35em;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
}

.tlndb-rate span {
    color: inherit;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

/* Fallback sizes for browsers without container queries. */
@media screen and (max-width: 768px) {
    .tlndb-rate p {
        font-size: 11px;
    }

    .tlndb-rate span {
        font-size: 30px;
    }
}

@media screen and (max-width: 520px) {
    .tlndb-rate p {
        font-size: 2.1vw;
    }

    .tlndb-rate span {
        font-size: 5.8vw;
    }
}

@supports (container-type: inline-size) {
    .tlndb-rate p {
        font-size: 2cqw;
    }

    .tlndb-rate span {
        font-size: 5.4cqw;
    }
}

/* ---------- Overview block ---------- */

.tlndb-bonus {
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.tlndb-bonus-head {
    display: flex !important;
    align-items: center;
    margin: 0;
    padding: 5px 10px;
    border: 2px solid #922f37;
    border-radius: 5px 5px 0 0;
    background-color: #922f37;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1em;
}

.tlndb-bonus-head:before {
    content: url('/wp-content/uploads/2025/02/face_logo.svg');
    display: inline-block;
    width: 38px;
    min-width: 38px;
    height: 38px;
    margin: -10px 10px -10px 0;
}

.tlndb-descr {
    padding: 15px;
}

.tlndb-descr p {
    margin-bottom: 5px;
}

.tlndb-descr table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid rgb(200, 200, 200);
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.tlndb-descr td,
.tlndb-descr th {
    border: 1px solid rgb(190, 190, 190);
    padding: 10px 20px;
}

/* ---------- Affiliate CTA ---------- */

.tlndb-aff a {
    text-decoration: none !important;
}

.tlndb-cta {
    display: inline-block;
    width: 100%;
    margin-top: 10px;
    padding: 0;
    border-radius: 8px;
    background-color: #47d147;
    color: #000;
    font-weight: bold;
    overflow: hidden;
    text-decoration: none;
}

.tlndb-cta:hover,
.tlndb-cta:visited {
    color: #000;
}

.tlndb-cta:hover {
    opacity: 0.9;
}

.tlndb-cta-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
}

.tlndb-cta-logo {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    background-color: #2ea62e;
    clip-path: polygon(0 0, 85% 0, 100% 50%, 85% 100%, 0 100%);
}

.tlndb-cta-logo-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
}

.tlndb-cta-img {
    display: block;
    height: 30px;
    width: auto;
    max-width: 85%;
    margin-left: -10px;
}

.tlndb-cta-text {
    padding: 0 10px;
    font-size: 14px;
    white-space: wrap;
}

.tlndb-cta-icon {
    display: flex;
    align-items: center;
    padding-right: 16px;
}

.tlndb-cta-icon svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media screen and (max-width: 1099px) {
    .tlndb-cta-text {
        font-size: 12px;
    }

    .tlndb-cta-logo-bg {
        width: 65px;
    }
}

/* ==========================================================================
   [ndb-score-details] - scoring breakdown dropdown
   Native <details>, so no JavaScript is involved.
   ========================================================================== */

.ndbsd {
    margin: 15px 0;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.ndbsd > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.4;
}

/* Hide the native disclosure triangle in every engine. */
.ndbsd > summary::-webkit-details-marker {
    display: none;
}

.ndbsd > summary::marker {
    content: "";
}

.ndbsd > summary:hover {
    background: #fafafa;
}

.ndbsd-title {
    flex: 1 1 auto;
    font-size: 15px;
    color: #222;
}

.ndbsd-chevron {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    color: #555;
    transition: transform 0.2s ease;
}

.ndbsd[open] .ndbsd-chevron {
    transform: rotate(180deg);
}

.ndbsd-body {
    padding: 4px 16px 16px;
    border-top: 1px solid #ececec;
}

.ndbsd-row + .ndbsd-row {
    margin-top: 18px;
}

.ndbsd-row-title {
    margin: 12px 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.5;
}

.ndbsd-row-text {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.ndbsd-row-text p {
    margin: 0 0 8px;
}

.ndbsd-row-text p:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 768px) {
    .ndbsd > summary {
        padding: 12px 14px;
    }

    .ndbsd-title {
        font-size: 14px;
    }

    .ndbsd-body {
        padding: 4px 14px 14px;
    }

    .ndbsd-row-title {
        font-size: 14px;
    }

    .ndbsd-row-text {
        font-size: 13px;
    }
}
