/* 痛症療程頁 */

/* 適用對象 */
.pt-scope-section {
    padding: 60px 0;
}

.pt-scope-pillars {
    gap: 48px 20px;
    margin-bottom: 0;
}

.pt-scope-pillars::before {
    display: none;
}

.pt-scope-section .intro-philosophy-pillar p {
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.visual-notice-icon{
    padding-top: 0;
}

/* 宣傳圖展示 */
.pt-showcase-section {
    padding: 60px 0;
    background: #fff;
}

.pt-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.pt-showcase-item {
    margin: 0;
    border: 1px solid var(--tcm-border);
    padding: 10px;
    background: var(--tcm-paper);
    overflow: hidden;
}

.pt-showcase-item img {
    width: 100%;
    display: block;
    border-radius: 2px;
}

.pt-showcase-item figcaption {
    padding: 14px 8px 6px;
    text-align: center;
    font-family: var(--family-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--tcm-ink);
}

.pt-showcase-item--wide {
    grid-column: 1 / -1;
}

/* 表單補充 */
.visual-page-section .clinic-options--scroll {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 360px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--tcm-border);
    background: var(--tcm-cream);
}

.visual-page-section .clinic-options--scroll .clinic-region-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(179, 32, 44, 0.15);
}

.visual-page-section .clinic-options--scroll .clinic-region-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.visual-page-section .clinic-options--scroll .layui-form-radio {
    margin: 0;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--tcm-border);
}

.visual-page-section .clinic-options--scroll .layui-form-radioed {
    border-color: var(--primary-color);
    background: var(--tcm-red-light);
}

.pt-form-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.pt-form-btns .layui-btn {
    min-width: 160px;
    height: 48px;
    line-height: normal;
    border-radius: 0;
    font-size: 16px;
}

.visual-form-notice strong {
    color: var(--primary-color);
    font-weight: 500;
}

/* 預約名額滾動數字 */
.quota-roll {
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

.quota-roll__viewport {
    display: inline-block;
    overflow: hidden;
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 38px;
    font-weight: 500;
    line-height: 1.2;
    /* font-family: var(--family-font-secondary); */
    color: var(--primary-color);
    vertical-align: middle;
}

.quota-roll__strip {
    display: flex;
    flex-direction: column;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    transform: translateY(0);
}

.quota-roll.is-animated .quota-roll__strip {
    transform: translateY(calc(var(--target, 0) * -43px));
}

.quota-roll__num {
    flex-shrink: 0;
    display: block;
    width: 100%;
    height: 43px;
    line-height: 33px;
    text-align: center;
}

/* 滾動完成：一次彈跳 */
.quota-roll.is-live .quota-roll__viewport {
    animation: quota-finish-bounce 0.55s ease-out, quota-attention 4s ease-in-out 1.2s infinite;
}

@keyframes quota-finish-bounce {
    0% { transform: scale(1); }
    35% { transform: scale(1.14); }
    65% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

/* 週期性微跳，暗示名額可能變動 */
@keyframes quota-attention {
    0%, 82%, 100% {
        transform: scale(1) translateY(0);
    }

    86% {
        transform: scale(1.08) translateY(-2px);
    }

    90% {
        transform: scale(0.97) translateY(1px);
    }

    94% {
        transform: scale(1.03) translateY(-1px);
    }
}

@media (max-width: 767px) {
    .quota-roll__viewport {
        font-size: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .quota-roll__strip {
        transition: none;
    }

    .quota-roll.is-live .quota-roll__viewport {
        animation: none;
    }
}

@media (max-width: 991px) {
    .pt-scope-pillars {
        grid-template-columns: repeat(2, 1fr);
    }

    .pt-showcase-grid {
        grid-template-columns: 1fr;
    }

    .pt-showcase-item--wide {
        grid-column: auto;
    }

}

@media (max-width: 767px) {

    .pt-showcase-section,
    .pt-scope-section {
        padding: 48px 0;
    }

    .pt-scope-pillars {
        grid-template-columns: 1fr;
    }

    .pt-form-btns {
        flex-direction: column;
    }

    .pt-form-btns .layui-btn {
        width: 100%;
        min-width: 0;
    }

    .visual-notice-icon{
        display: none;
    }
}

.visual-detail-intro-visual img {
    height: auto;
}

.visual-detail-highlights {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.row-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.img-left {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    border: 1px solid var(--tcm-border);
    overflow: hidden;
    background: #fff;
    padding: 12px;
}

.img-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.row-wrapper-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: flex-start;
}

.img-right {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    border: 1px solid var(--tcm-border);
    overflow: hidden;
    background: #fff;
    padding: 12px;
}

.img-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-detail-process {
    margin-top: 0;
    grid-template-columns: 1fr;
    gap: 40px;
    position: relative;
}

.visual-detail-process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: rgba(179, 32, 44, 0.2);
}

.visual-detail-step {
    padding: 30px 20px 28px 40px;
}

/* 預約表單 */
.pt-form-section {
    padding: 60px 0;
}

.pt-form-layout {
    display: grid;
    grid-template-columns: 0.42fr 0.58fr;
    gap: 40px;
    align-items: start;
}

.pt-form-visual-inner {
    border: 1px solid var(--tcm-border);
    padding: 10px;
    background: #fff;
    box-shadow: var(--tcm-shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pt-form-visual-inner img {
    width: 100%;
    display: block;
}

.pt-form-head {
    margin-bottom: 20px;
}

.pt-form-head .section-eyebrow {
    /* display: block; */
    margin-bottom: 12px;
}

.pt-form-head .section-title {
    text-align: left;
    margin-bottom: 12px;
}

.pt-form-head>p {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(44, 36, 22, 0.72);
    margin: 0;
}

.pt-form-section .visual-form-notice {
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 24px;
}

.pt-form-section .visual-form-notice p {
    font-size: 17px;
    text-align: left;
}

.pt-form-section .visual-form-box {
    margin-top: 0;
}

.pt-form-fields {
    grid-template-columns: 1fr;
    gap: 0;
}

.pt-form-section .pt-form-btns {
    justify-content: flex-start;
}

.pt-form-main {
    position: sticky;
    top: 110px;
    align-self: flex-start;
    height: fit-content;
}

.visual-detail-highlight-body h3 {
    font-size: 22px;
}

@media (max-width: 991px) {
    .pt-form-layout {
        grid-template-columns: 1fr;
    }

    .pt-form-visual-inner {
        position: static;
    }

    .pt-form-head .section-title {
        text-align: center;
    }

    .pt-form-head>p {
        text-align: center;
    }

    .pt-form-section .visual-form-notice {
        justify-content: center;
        flex-direction: row;
    }

    .pt-form-section .visual-form-notice p {
        text-align: center;
    }

    .pt-form-section .pt-form-btns {
        justify-content: center;
    }

    .pt-form-fields {
        grid-template-columns: 1fr;
    }


    .pt-form-head {
        text-align: center;
    }

    .pt-form-head .section-title {
        font-size: 30px;
    }

    .pt-form-btns .layui-btn {
        margin-left: 0;
    }

    .row-wrapper {
        grid-template-columns: 1fr;
    }

    .visual-detail-highlights {
        gap: 20px;
    }

    .visual-detail-highlight-body h3 {
        font-size: 20px;
    }

    .row-wrapper-2 {
        grid-template-columns: 1fr;
    }

    .visual-detail-process {
        gap: 20px;
    }

    .visual-detail-hours-grid {
        margin-top: 20px;
    }
}

@media (max-width: 767px) {
    .pt-form-section {
        padding: 30px 0 30px;
    }
}

.visual-detail-process-section {
    background: #fff;
}

/* 選日期後彈出可選時段 */
.pain-time-picker {
    padding: 12px 16px 18px;
}

.pain-time-picker__hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: rgba(44, 36, 22, 0.72);
    line-height: 1.5;
}

.pain-time-picker__slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pain-time-slot {
    height: 36px;
    border: 1px solid var(--tcm-border);
    background: #fff;
    color: var(--tcm-ink);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pain-time-slot:hover,
.pain-time-slot.is-active {
    border-color: rgba(179, 32, 44, 0.45);
    color: var(--primary-color);
    background: rgba(179, 32, 44, 0.04);
}

@media (max-width: 480px) {
    .pain-time-picker__slots {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}