﻿/* 雅文檢測音外掛 樣式 - article_detail_test01 設計風格 */
.wonderland-ht-wrapper {
    --wht-primary: #377D77;
    --wht-primary-dark: #2A615C;
    --wht-primary-soft: #DCEBE9;
    --wht-bg: #ffffff;
    --wht-modal-bg: #FFF8E7;
    --wht-title: #345E51;
    --wht-text: #4A4A4A;
    --wht-muted: #8A8A8A;
    --wht-border: #E5DCC8;
    --wht-yes: #5BB37A;
    --wht-no: #E0574B;

    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 12px 24px 32px;
    background: var(--wht-bg);
    border-radius: 16px;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: var(--wht-text);
    line-height: 1.75;
    box-sizing: border-box;
}

.wonderland-ht-wrapper *,
.wonderland-ht-wrapper *::before,
.wonderland-ht-wrapper *::after {
    box-sizing: border-box;
}

.wonderland-ht-wrapper svg {
    display: inline-block;
    vertical-align: middle;
    overflow: visible;
}

.wonderland-ht-mark svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

.wonderland-ht-mark svg path {
    fill: #fff !important;
}

.wonderland-ht-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}

.wonderland-ht-btn svg path {
    fill: currentColor !important;
}

/* 步驟 */
.wonderland-ht-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.wonderland-ht-step {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.wonderland-ht-step-label {
    display: inline-flex;
    align-items: center;
    color: var(--wht-primary);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    min-width: 64px;
}

.wonderland-ht-step-link {
    color: var(--wht-primary);
    text-decoration: underline;
    font-weight: 600;
}

.wonderland-ht-step-link:hover {
    color: var(--wht-primary-dark);
}

.wonderland-ht-step-text {
    color: var(--wht-text);
    font-weight: 500;
}

.wonderland-ht-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--wht-text) !important;
    font-weight: 400;
}

.wonderland-ht-radio:hover,
.wonderland-ht-radio:active,
.wonderland-ht-radio:focus,
.wonderland-ht-radio:focus-within {
    color: var(--wht-text) !important;
    background: transparent !important;
}

.wonderland-ht-radio span {
    color: inherit !important;
}

.wonderland-ht-radio input {
    accent-color: var(--wht-primary);
}

/* 檢測方式按鈕 */
.wonderland-ht-method-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wonderland-ht-method-btn {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1.5px solid var(--wht-border) !important;
    border-radius: 999px !important;
    padding: 7px 18px;
    font-size: 14px;
    cursor: pointer;
    color: var(--wht-muted) !important;
    transition: all .2s;
    font-family: inherit;
    box-shadow: none !important;
    text-shadow: none !important;
}

.wonderland-ht-method-btn:not(:disabled):hover,
.wonderland-ht-method-btn:not(:disabled):focus {
    background: #fff !important;
    background-color: #fff !important;
    border-color: var(--wht-primary) !important;
    color: var(--wht-primary) !important;
    outline: none;
}

.wonderland-ht-method-btn.is-active,
.wonderland-ht-method-btn.is-active:hover,
.wonderland-ht-method-btn.is-active:focus,
.wonderland-ht-method-btn.is-active:active {
    background: var(--wht-primary) !important;
    background-color: var(--wht-primary) !important;
    border-color: var(--wht-primary) !important;
    color: #fff !important;
    font-weight: 600;
}

.wonderland-ht-method-btn:disabled,
.wonderland-ht-method-btn[disabled] {
    cursor: not-allowed;
    opacity: .5;
    background: #F5F5F5 !important;
    background-color: #F5F5F5 !important;
    color: #B8B3A4 !important;
    border-color: var(--wht-border) !important;
}

/* 影片 */
.wonderland-ht-video {
    margin: 24px 0;
}

.wonderland-ht-video-frame {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 6px 20px rgba(52, 94, 81, .12);
}

.wonderland-ht-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 流程說明 */
.wonderland-ht-instructions {
    list-style: decimal outside !important;
    list-style-type: decimal !important;
    padding-left: 28px !important;
    margin: 18px 0 32px;
    font-size: 15px;
    color: var(--wht-text);
    counter-reset: wht-step;
}

.wonderland-ht-instructions li {
    display: list-item !important;
    list-style: decimal outside !important;
    list-style-type: decimal !important;
    margin-bottom: 10px;
    padding-left: 4px;
}

.wonderland-ht-instructions li::marker {
    content: counter(list-item) ". ";
    color: var(--wht-primary);
    font-weight: 700;
}

.wonderland-ht-instructions a {
    color: var(--wht-primary);
    font-weight: 600;
    text-decoration: underline;
}

.wonderland-ht-instructions a:hover {
    color: var(--wht-primary-dark);
}

/* 卡片標題 */
.wonderland-ht-cards-title {
    text-align: center;
    margin: 28px 0 18px;
    padding-bottom: 24px;
    border-bottom: 1px solid #D9D9D9;
}

.wonderland-ht-cards-title h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--wht-title);
    letter-spacing: 1px;
}

.wonderland-ht-cards-title p {
    margin: 0;
    color: var(--wht-muted);
    font-size: 13px;
}

/* 圖卡網格 */
.wonderland-ht-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

@media (max-width: 540px) {
    .wonderland-ht-cards {
        grid-template-columns: 1fr;
    }

    .wonderland-ht-step-text {
        flex: 1 1 auto;
    }

    .wonderland-ht-radio,
    .wonderland-ht-method-tabs {
        flex-basis: 100%;
        margin-left: 76px;
        /* 與 STEP 標籤(64px) + gap(12px) 對齊 */
    }

    .wonderland-ht-radio {
        gap: 8px;
    }

    .wonderland-ht-method-tabs {
        gap: 10px;
    }
}

.wonderland-ht-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wonderland-ht-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0;
    border-radius: 16px;
    cursor: pointer;
    display: block;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    box-sizing: border-box;
}

.wonderland-ht-card-image:hover,
.wonderland-ht-card-image:focus,
.wonderland-ht-card-image:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    outline: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .15);
}

.wonderland-ht-card-pic {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* 卡片底下動作 */
.wonderland-ht-card-actions {
    display: flex;
    gap: 14px;
}

.wonderland-ht-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #D9D2BD !important;
    background-color: #D9D2BD !important;
    background-image: none !important;
    box-shadow: none !important;
    padding: 0;
    transition: transform .15s, background .2s;
}

.wonderland-ht-mark:hover {
    transform: scale(1.08);
    background: #D9D2BD !important;
    background-color: #D9D2BD !important;
}

.wonderland-ht-mark.is-active {
    /* 預設選中仍為原色 */
}

.wonderland-ht-mark-yes.is-active,
.wonderland-ht-mark-yes.is-active:hover {
    background: var(--wht-yes) !important;
    background-color: var(--wht-yes) !important;
}

.wonderland-ht-mark-no.is-active,
.wonderland-ht-mark-no.is-active:hover {
    background: var(--wht-no) !important;
    background-color: var(--wht-no) !important;
}

/* 動作按鈕 */
.wonderland-ht-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.wonderland-ht-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 32px;
    border-radius: 999px !important;
    border: 1.5px solid var(--wht-primary) !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--wht-primary) !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    box-shadow: none !important;
    text-shadow: none !important;
}

.wonderland-ht-btn:hover,
.wonderland-ht-btn:focus,
.wonderland-ht-btn:active {
    background: var(--wht-primary) !important;
    background-color: var(--wht-primary) !important;
    border-color: var(--wht-primary) !important;
    color: #fff !important;
    outline: none;
    box-shadow: none !important;
}

.wonderland-ht-btn-result,
.wonderland-ht-btn-result:hover,
.wonderland-ht-btn-result:focus,
.wonderland-ht-btn-result:active {
    background: var(--wht-primary) !important;
    background-color: var(--wht-primary) !important;
    border-color: var(--wht-primary) !important;
    color: #fff !important;
}

.wonderland-ht-btn-result:hover {
    background: var(--wht-primary-dark) !important;
    background-color: var(--wht-primary-dark) !important;
    border-color: var(--wht-primary-dark) !important;
}

/* 結果展開區塊（取代彈跳視窗） */
.wonderland-ht-result {
    margin-top: 32px;
    padding: 32px 28px;
    background: var(--wht-modal-bg, #FFF8E7);
    border-radius: 16px;
    border: 1px solid var(--wht-border, #E5DCC8);
    animation: wonderland-ht-slide .3s ease;
}

.wonderland-ht-result[hidden] {
    display: none !important;
}

@keyframes wonderland-ht-slide {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wonderland-ht-result-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 18px;
    color: #345E51;
    letter-spacing: 1px;
}

.wonderland-ht-result-title::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin: 8px auto 0;
    background: #E8623F;
    border-radius: 2px;
}

.wonderland-ht-result-text {
    font-size: 15px;
    line-height: 1.85;
    color: #4A4A4A;
    margin: 0 0 22px;
    padding: 0 4px;
    background: transparent;
    border: none;
}

.wonderland-ht-result-subtitle {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    margin: 22px 0 14px;
    padding-top: 22px;
    border-top: 1px solid #D9D9D9;
    color: #345E51;
}

.wonderland-ht-result-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    max-width: 720px;
    margin: 0 auto;
}

.wonderland-ht-result-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
