/* ============================================================
   Uedu 全站使用體驗回饋（CSAT）元件樣式
   - 頁尾常駐五段表情評分；送出後顯示感謝＋「想多說一點？」連結
   - 主要 CTA 走 pill 全圓角＋品牌漸層（CLAUDE.md 按鈕兩層制）
   - 只改顏色不移動位置的 hover；鍵盤 focus 可見
   ============================================================ */

.uedu-csat[hidden],
.uedu-csat [hidden] { display: none !important; }

.uedu-csat {
    padding: 0 0 8px;
}

.uedu-csat__inner {
    position: relative;
    max-width: 540px;
    margin: 0 auto 30px;
    padding: 22px 20px 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
}

.uedu-csat__heading {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
}

.uedu-csat__fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

.uedu-csat__scale {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.uedu-csat__option { position: relative; }

.uedu-csat__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 500;
    color: #334155;
    user-select: none;
}

.uedu-csat__label svg {
    width: 54px;
    height: 54px;
    padding: 9px;
    margin-bottom: 6px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #3C6F9A;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.uedu-csat__label:hover svg {
    border-color: #3C6F9A;
    background: rgba(60, 111, 154, 0.06);
}

.uedu-csat__option input:checked + .uedu-csat__label svg {
    border-color: #3C938A;
    background: rgba(60, 147, 138, 0.12);
    box-shadow: 0 0 0 2px rgba(60, 147, 138, 0.35);
    color: #2d5578;
}

.uedu-csat__option input:checked + .uedu-csat__label {
    color: #1f2937;
    font-weight: 700;
}

.uedu-csat__option input:focus-visible + .uedu-csat__label svg {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

.uedu-csat__fieldset.is-invalid .uedu-csat__label svg {
    border-color: #c0392b;
}

.uedu-csat__error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: .9rem;
    font-weight: 600;
    color: #c0392b;
}

.uedu-csat__error svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.uedu-csat__submit {
    margin-top: 16px;
    padding: 9px 30px;
    border: 0;
    border-radius: 50rem;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    background: #3C6F9A;
    background: linear-gradient(149deg, #3C6F9A, #3C938A);
    cursor: pointer;
    transition: box-shadow .15s ease, opacity .15s ease;
}

.uedu-csat__submit:hover { box-shadow: 0 0 0 3px rgba(60, 147, 138, 0.25); color: #fff; }
.uedu-csat__submit:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.uedu-csat__submit:disabled { opacity: .6; cursor: default; box-shadow: none; }

.uedu-csat__dismiss {
    position: absolute;
    top: 6px;
    right: 8px;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}
.uedu-csat__dismiss:hover { color: #475569; }
.uedu-csat__dismiss:focus-visible { outline: 2px solid #ffbf47; border-radius: 4px; }

.uedu-csat__done-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.uedu-csat__done-msg svg {
    width: 22px;
    height: 22px;
    color: #3C938A;
    flex: 0 0 auto;
}

.uedu-csat__more {
    font-size: .95rem;
    color: #3C6F9A;
    text-decoration: underline;
}
.uedu-csat__more:hover { color: #2d5578; text-decoration: underline; }

.uedu-csat__note {
    margin: 10px 0 0;
    font-size: .8rem;
    line-height: 1.5;
    color: #64748b;
}

.uedu-csat__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 430px) {
    .uedu-csat__inner { padding: 18px 12px 16px; }
    .uedu-csat__scale { gap: 6px; }
    .uedu-csat__label { font-size: .78rem; }
    .uedu-csat__label svg { width: 46px; height: 46px; padding: 7px; }
}

@media print {
    .uedu-csat { display: none !important; }
}
