/**
 * Beverage Tasting Card - Frontend Display Styles
 * Full-width side-by-side layout: left 30% portrait / right 70% forced equal height
 */

/* ===== Card Container ===== */
.beverage-tasting-card-single {
    max-width: 860px;
    margin: 0 auto;
    padding: 30px 0;
}

.btc-card-wrapper {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 30px;
    position: relative;
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 8px) var(--main-radius, 8px) 0 0;
    padding: 0;
}

/* ===== Full-width footer (score box, comments, etc.) ===== */
.btc-card-footer {
    background: var(--main-bg-color, #fff);
    border-radius: 0;
    padding: 20px 30px 24px;
    margin-top: 0;
}

/* Last footer gets the bottom rounded corners */
.beverage-tasting-card-single > .btc-card-footer:last-child {
    border-radius: 0 0 var(--main-radius, 8px) var(--main-radius, 8px);
}

/* ===== Left Bottle Image (9:20 portrait container) =====
   ::before padding creates aspect ratio, row height determined by it
   Image centered with contain, no crop or compression */
.btc-card-left {
    width: 100%;
    min-height: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--main-radius, 8px);
    background: var(--muted-bg-color, #f5f5f5);
}

.btc-card-left::before {
    content: '';
    display: block;
    padding-bottom: 222.22%; /* 20/9 = 222.22% */
}

.btc-bottle-image {
    position: absolute;
    inset: 0;
}

.btc-card-left .btc-bottle-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Right Text Area (absolute anchor, forced equal height with left) ===== */
.btc-card-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: calc(30% + 30px); /* Column Width + gap */
    min-width: 0;
    overflow-y: auto;
    padding-right: 15px;
}

/* Variety Title */
.btc-card-wrapper .btc-variety-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--main-color, #333);
    margin: 0 0 5px 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

/* ===== General section ===== */
.btc-section {
    margin-top: 25px;
}

.btc-card-wrapper .btc-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted-2-color, #999);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--btc-accent, var(--theme-color, #8B1A2B));
    display: inline-block;
}

/* ===== Aroma & Flavor Grid ===== */
.btc-flavors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.btc-flavor-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--main-radius, 8px);
    transition: background 0.2s;
}

.btc-flavor-item:hover {
    background: var(--muted-bg-color, #f5f5f5);
}

.btc-flavor-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btc-flavor-icon svg {
    width: 100%;
    height: 100%;
}

.btc-flavor-emoji {
    font-size: 18px;
    line-height: 1;
}

.btc-flavor-name {
    font-size: 13px;
    color: var(--main-color, #555);
    line-height: 1.3;
    word-break: break-word;
}

/* ===== Taste Profile Progress Bar ===== */
.btc-profile-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.btc-profile-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btc-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btc-bar-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--main-color, #444);
}

.btc-bar-track {
    width: 100%;
    height: 6px;
    background: var(--muted-4-color, #e8e8e8);
    border-radius: 3px;
    overflow: hidden;
}

.btc-bar-fill {
    height: 100%;
    background: var(--btc-accent, var(--theme-color, #8B1A2B));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ===== List Summary ===== */
.btc-excerpt-variety {
    font-weight: 600;
    color: var(--theme-color, #8B1A2B);
}

/* ===== Responsive: maintain side-by-side layout across devices, reduce padding/gap/font size ===== */
@media (max-width: 768px) {
    .beverage-tasting-card-single {
        padding: 20px 0;
    }

    .btc-card-wrapper {
        gap: 15px;
        border-radius: 8px;
    }

    /* Right anchor position follows gap changes */
    .btc-card-right {
        left: calc(30% + 15px);
    }

    .btc-card-wrapper .btc-variety-title {
        font-size: 16px;
        margin-bottom: 3px;
        line-height: 1.2;
    }

    .btc-section {
        margin-top: 10px;
    }

    .btc-card-wrapper .btc-section-title {
        font-size: 12px;
        letter-spacing: 1px;
        margin-bottom: 4px;
        padding-bottom: 3px;
    }

    /* Aroma & Flavors: single row, emoji icons only */
    .btc-flavors-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
    }

    .btc-flavor-item {
        flex-shrink: 0;
        padding: 2px;
    }

    .btc-flavor-icon {
        width: 24px;
        height: 24px;
    }

    .btc-flavor-emoji {
        font-size: 18px;
    }

    .btc-flavor-name {
        display: none;
    }

    .btc-profile-bars {
        gap: 8px;
    }

    .btc-bar-name {
        font-size: 11px;
    }

    .btc-bar-track {
        height: 5px;
    }
}

@media (max-width: 480px) {
    .btc-card-wrapper {
        gap: 10px;
        border-radius: 0;
    }

    .btc-card-right {
        left: calc(30% + 10px);
    }

    .btc-card-wrapper .btc-variety-title {
        font-size: 14px;
    }

    .btc-section {
        margin-top: 8px;
    }

    .btc-card-wrapper .btc-section-title {
        font-size: 12px;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
        padding-bottom: 2px;
    }

    .btc-flavors-grid {
        gap: 6px;
    }

    .btc-flavor-icon {
        width: 20px;
        height: 20px;
    }

    .btc-flavor-emoji {
        font-size: 15px;
    }

    .btc-profile-bars {
        gap: 6px;
    }

    .btc-bar-name {
        font-size: 10px;
    }

    .btc-bar-track {
        height: 4px;
    }
}

/* ============================================================
   CTA Button & Bottom Title
   ============================================================ */
.btc-bottom-title-wrapper {
    max-width: 860px;
    margin: 0 auto 16px auto;
    padding: 0 24px;
}

.btc-bottom-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-color, #333);
    margin: 0;
    line-height: 1.5;
    text-align: center;
}

.btc-card-action {
    max-width: 860px;
    margin: 0 auto 24px auto;
    padding: 0 24px;
    text-align: center;
}

.btc-card-button {
    display: inline-block;
    padding: 12px 40px;
    background: linear-gradient(135deg, var(--theme-color, #8B1A2B), var(--focus-color, #C41E3A));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--main-radius, 8px);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btc-card-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--focus-shadow-color, rgba(139, 26, 43, 0.35));
    color: #fff;
}

@media (max-width: 640px) {
    .btc-bottom-title-wrapper,
    .btc-card-action {
        padding: 0 16px;
    }
    .btc-bottom-title {
        font-size: 14px;
    }
    .btc-card-button {
        padding: 10px 28px;
        font-size: 14px;
    }
}

/* ============================================================
   GEO: Key Takeaways Block
   ============================================================ */
.btc-key-takeaways {
    max-width: 860px;
    margin: 0 auto 20px auto;
    padding: 18px 24px;
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 8px);
    box-shadow: 0 1px 3px var(--main-shadow, rgba(0,0,0,0.04));
}

.btc-key-takeaways-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--main-color, #333);
    margin: 0 0 12px 0;
    letter-spacing: 0.5px;
}

.btc-key-takeaways-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.btc-key-takeaways-list li {
    position: relative;
    padding: 0 0 0 18px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--main-color, #333);
}

.btc-key-takeaways-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--btc-accent, var(--theme-color, #8B1A2B));
    font-weight: 700;
}

.btc-key-takeaways-list li strong {
    color: var(--key-color, var(--main-color, #333));
    font-weight: 600;
}

/* ============================================================
   Tasting Details (Q&A — primary detail display, GEO-backed)
   Replaces old separate Serving Tips / Food Pairing blocks.
   ============================================================ */
.btc-tasting-details {
    max-width: 860px;
    margin: 0 auto 12px auto;
    padding: 0;
}

.btc-tasting-details-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--main-color, #333);
    margin: 0 0 20px 0;
    letter-spacing: 0.3px;
    padding: 0 24px;
}

.btc-tasting-details-list {
    border-top: 2px solid var(--btc-accent, var(--theme-color, #8B1A2B));
    border-bottom: 2px solid var(--btc-accent, var(--theme-color, #8B1A2B));
}

.btc-tasting-details-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--muted-border-color, #f0e8dd);
    transition: background 0.15s;
}

.btc-tasting-details-item:last-child {
    border-bottom: none;
}

.btc-tasting-details-item:hover {
    background: var(--muted-bg-color, #f5f5f5);
}

.btc-tasting-details-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--main-color, #333);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.btc-tasting-details-answer {
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted-color, #777);
}

.btc-tasting-details-answer p {
    margin: 0;
}

/* Mobile */
@media (max-width: 640px) {
    .btc-key-takeaways {
        padding: 14px 16px;
        margin-bottom: 16px;
        border-radius: 0;
    }

    .btc-key-takeaways-title {
        font-size: 14px;
    }

    .btc-key-takeaways-list li {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .btc-tasting-details-item {
        padding: 14px 16px;
    }

    .btc-tasting-details-question {
        font-size: 14px;
    }

    .btc-tasting-details-answer {
        font-size: 13px;
    }

    .btc-tasting-details-title {
        font-size: 15px;
        padding: 0 16px;
    }
}

/* ===== Override theme image styles (scoped to Beverage Tasting Card only) ===== */
.beverage-tasting-card-single .wp-posts-content img,
.beverage-tasting-card-single img[class*="btc-"] {
    object-fit: cover;
}

/* ===== Score Box (Zibll 论坛评分集成) ===== */
.btc-card-footer .score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.btc-card-footer .score-box .score-btns {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}

.btc-card-footer .score-box .score-btns text {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--main-color, #333);
}

.btc-card-footer .score-box .btn-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all .2s ease;
    color: var(--muted-2-color, #999);
}

.btc-card-footer .score-box .btn-score svg {
    width: 18px;
    height: 18px;
}

.btc-card-footer .score-box .btn-score.extra:hover,
.btc-card-footer .score-box .btn-score.extra.active {
    color: #f44336;
    background: rgba(244,67,54,.08);
}

.btc-card-footer .score-box .btn-score.deduct:hover,
.btc-card-footer .score-box .btn-score.deduct.active {
    color: #2196F3;
    background: rgba(33,150,243,.08);
}

.btc-card-footer .score-box .score-box-detail {
    margin-top: 10px;
    text-align: center;
}

.btc-card-footer .score-box .score-box-detail .desc {
    font-size: 12px;
}

.btc-card-footer .score-box .score-users {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    justify-content: center;
}

.btc-card-footer .score-box .score-user-item {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
    position: relative;
}

.btc-card-footer .score-box .score-user-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Allow +1/-1 badge to overflow avatar container */
.btc-card-footer .score-box .score-user-item .avatar-icontag {
    z-index: 3;
    pointer-events: none;
}


/* Mobile tweak */
@media (max-width: 640px) {
    .btc-card-footer .score-box {
        margin-top: 16px;
        padding-top: 12px;
    }
    .btc-card-footer .score-box .btn-score {
        width: 28px;
        height: 28px;
    }
    .btc-card-footer .score-box .btn-score svg {
        width: 16px;
        height: 16px;
    }
}
