/* ===================== Survey專用 ===================== */
body {
    background: #f7fafd;
}

/* 新增問卷按鈕 */
.custom-survey-btn {
    width: 100%;
    height: 40px; /* 比原本矮一點 */
    margin-top: 10px;
    background: #83cabd;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05em; /* 字體適中 */
    font-weight: 500;
    letter-spacing: 1px;
    transition: background 0.17s;
    box-shadow: 0 1px 3px #83cabd40;
}

    .custom-survey-btn:hover,
    .custom-survey-btn:focus {
        background: #72b2a9;
        color: #fff;
    }

/* 問題主框 */
.survey-module {
    background: #fff !important;
    border-radius: 10px !important;
    border: 2px solid #82c7bd !important;
    margin-bottom: 10px !important;
    padding: 12px 14px 10px 14px !important; /* 比原本少一半 */
    min-width: 240px !important;
    box-shadow: 0 2px 12px #4ec6d120, 0 1px 4px #68d1d905;
}

/* 問題標題 */
.survey-title {
    font-size: 1em; /* 比原本小一點 */
    font-weight: bold;
    color: #39b1a9;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* =================== 選項列表 =================== */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    padding: 0 0 2px 0;
}

/* =================== 選項卡條 =================== */
.option-module {
    background: #fff !important;
    border: 2px solid #8bd7cf !important;
    border-radius: 7px !important;
    padding: 6px 12px !important; /* 原本12px 20px，現在更扁一點 */
    min-height: 24px;
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 0.96em;
    color: #24a0a0;
    box-sizing: border-box;
    width: 100%;
    transition: box-shadow .14s, border .14s, background .14s;
    cursor: pointer;
    box-shadow: 0 1px 5px #3dd0c212;
}

    .option-module:hover,
    .option-module.editing {
        background: #eafdfb !important;
        border-color: #38b3b4 !important;
        box-shadow: 0 2px 8px #7adce925;
    }

    .option-module input[type="radio"] {
        margin-right: 10px;
        accent-color: #55bfc2;
    }

    .option-module .option-content {
        flex: 1 1 auto;
        min-height: 18px;
        border: none;
        outline: none;
        padding: 1px 6px;
        background: transparent;
        font-size: 0.96em;
        color: #179f93;
        cursor: pointer;
        transition: border .15s;
    }

/* chips外框，無額外空白 */
.tags-container .badge {
    background: #4ec39b;
    color: #fff;
    border-radius: 12px;
    font-size: 1rem;
    padding: 5px 12px 5px 10px;
    display: inline-flex; /* 關鍵！ */
    align-items: center;
    gap: 8px;
    margin: 0;
    box-shadow: 0 2px 7px rgba(78,195,155,0.08);
    max-width: 90%;
    min-height: 0;
    line-height: 1.25;
    transition: box-shadow 0.2s;
    vertical-align: middle;
    word-break: break-word;
    white-space: pre-line;
}

.badge .chip-text {
    flex: 1 1 auto; /* 填滿剩餘寬度，自動換行 */
    display: block;
    min-width: 0;
    word-break: break-word;
    white-space: pre-line;
    text-align: left; /* 若要左對齊（可改center） */
}

.badge .chip-close {
    font-size: 1.2em;
    margin-left: 8px;
    cursor: pointer;
    align-self: flex-start;
    user-select: none;
    transition: color 0.2s;
}

    .badge .chip-close:hover {
        color: #eee;
    }


/* 下拉箭頭（與 input 對齊） */
#tagDropdownArrow {
    margin-left: -36px;
    margin-bottom: 2px;
    height: 38px;
    display: flex;
    align-items: center;
    background: transparent;
    z-index: 2;
}

/* 下拉建議清單（美化陰影和圓角） */
.tag-suggestions {
    border-radius: 7px;
    box-shadow: 0 2px 12px #eee;
}

/* 防止chips有多餘空白行 */
.tags-container:empty {
    margin-bottom: 0;
    min-height: 0;
    height: auto;
}

    /* 不要X按鈕的話直接隱藏（保險） */
/*    .option-module .btn-link.btn-sm {
        display: none !important;
    }*/

/* 響應式（如果有需要） */
@media (max-width: 700px) {
    .survey-module {
        padding: 8px 5px 6px 5px !important;
    }

    .option-module {
        padding: 5px 6px !important;
        font-size: 0.92em;
    }
}
