/* 单人配音工作台（2026 布局改版） */
.tts-studio {
    height: calc(100vh - 84px);
    margin-bottom: 0;
}

.tts-studio .g-tool__in {
    height: calc(100% - 20px);
    margin: 10px 10px 10px 240px;
}

.tts-studio .g-tool__newStyle-wrap {
    display: none;
}

.tts-studio .__write-box {
    height: 100%;
    min-height: 0;
    margin-left: 10px;
    background: transparent;
}

.tts-studio .ai-sound__wrap,
.tts-studio .ai-sound,
.tts-studio #container,
.tts-studio .layui-form {
    height: 100%;
}

/* ---------- 顶部工具栏（DOM 留在编辑器内，仅视觉置顶） ---------- */
.tts-studio .tts-tools {
    position: fixed;
    top: 74px;
    left: 250px;
    right: 10px;
    z-index: 50;
    display: flex;
    align-items: center;
    height: 64px;
    box-sizing: border-box;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #e6eefb;
    border-radius: 14px;
}

.tts-studio .tts-tools__item {
    flex: none;
    background: transparent;
}

.tts-studio .tts-tools__btn {
    height: 58px;
    padding: 0 10px;
    border-radius: 8px;
}

.tts-studio .tts-tools__btn:hover {
    background: #f5f9ff;
}

.tts-studio .tts-tools__title {
    margin-top: 2px;
    font-size: 11.5px;
    color: #475467;
}

.tts-studio .tts-tools__btn:hover .tts-tools__title {
    color: var(--color-primary);
}

.tts-studio .tts-tools__svg svg {
    width: 25px;
    height: 25px;
}

.tts-studio .tts-tools__item.__line {
    width: 1px;
    height: 28px;
    margin: 0 4px;
    background: #eef3fa;
}

/* ---------- 主区域三栏 ---------- */
.tts-studio .ai-sound__in {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(440px, 36%, 560px) 360px;
    gap: 14px;
    height: 100%;
    box-sizing: border-box;
    padding-top: 76px;
    margin: 0;
}

.tts-studio .ai-sound__bot {
    grid-column: 1;
    grid-row: 1;
}

.tts-studio .__voice-modal__list {
    grid-column: 2;
    grid-row: 1;
}

.tts-studio .__voice-modal__body {
    grid-column: 3;
    grid-row: 1;
}

.tts-studio .__voice-zoom {
    display: none !important;
}

.tts-studio .__voice-modal,
.tts-studio.__mini .__voice-modal,
.tts-studio .__voice-modal-in {
    display: contents !important;
}

.tts-studio .__voice-modal {
    position: static;
    width: auto;
    height: auto;
    transform: none !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    z-index: auto;
}

.tts-studio .__voice-modal__title {
    display: none;
}

.tts-studio .__voice-modal__list {
    display: flex !important;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    width: auto;
    height: 100%;
    background: #fff;
    border: 1px solid #e6eefb;
    border-radius: 14px;
    overflow: hidden;
}

.tts-studio .__voice-modal__body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 100%;
    padding: 14px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e6eefb;
    border-radius: 14px;
    overflow-y: auto;
}

.tts-studio .__voice-modal__body::-webkit-scrollbar,
.tts-studio .__sound-list__wrap::-webkit-scrollbar,
.tts-studio #__collect-list::-webkit-scrollbar {
    width: 5px;
}

.tts-studio .__voice-modal__body::-webkit-scrollbar-thumb,
.tts-studio .__sound-list__wrap::-webkit-scrollbar-thumb,
.tts-studio #__collect-list::-webkit-scrollbar-thumb {
    background: #dbe5f3;
    border-radius: 5px;
}

/* ---------- 主播列表 ---------- */
.tts-studio__list-head {
    flex: none;
    padding: 18px 20px 0;
}

.tts-studio__tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid #eef3fa;
}

.tts-studio__tabs button {
    position: relative;
    padding: 0 0 12px;
    border: 0;
    background: none;
    color: #667085;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.tts-studio__tabs button.is-active {
    color: var(--color-primary);
}

.tts-studio__tabs button.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-primary);
}

.tts-studio .__sound-list-wrap {
    flex: 1;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
}

.tts-studio .__sound-tabs {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tts-studio .__sound-tabs__item {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tts-studio .__sound-search {
    display: flex;
    align-items: center;
    flex: none;
    height: 40px;
    margin: 14px 20px 6px;
    padding: 0;
    border: 1px solid #e6eefb;
    border-radius: 20px;
    background: #f7faff;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.tts-studio .__sound-search:focus-within {
    border-color: #9bc0ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(61, 126, 255, .1);
}

.tts-studio .__sound-search .layui-input,
.tts-studio .__sound-search .layui-input:hover {
    flex: 1;
    min-width: 0;
    height: 40px;
    line-height: 40px;
    padding: 0 14px 0 16px;
    border: 0 !important;
    border-radius: 20px 0 0 20px;
    background: transparent;
    box-shadow: none !important;
    outline: none;
    font-size: 13.5px;
}

.tts-studio .__sound-search .layui-input:focus {
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
}

.tts-studio .__sound-searcg__btn {
    flex: none;
    width: 46px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0 20px 20px 0;
    background: transparent;
    font-size: 0;
    justify-content: center;
}

.tts-studio .__sound-searcg__btn .iconfont {
    font-size: 16px;
    margin: 0;
}

.tts-studio__filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    height: 38px;
    margin: 4px 20px 10px;
    padding: 0 14px;
    border: 1px solid #eef3fa;
    border-radius: 8px;
    background: #f5f8fd;
    color: #667085;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.tts-studio__filter-title {
    color: #667085;
    font-size: 13px;
    font-weight: 500;
}

.tts-studio__filter-chevron {
    color: #98a2b3;
    transition: transform .2s ease, color .2s ease;
}

.tts-studio__filter-head:hover {
    background: #eef4ff;
    border-color: #cfe0ff;
}

.tts-studio__filter-head:hover .tts-studio__filter-title,
.tts-studio__filter-head:hover .tts-studio__filter-chevron {
    color: var(--color-primary);
}

.tts-studio__filter-head.is-expanded {
    justify-content: center;
}

.tts-studio__filter-head.is-expanded .tts-studio__filter-title {
    display: none;
}

.tts-studio__filter-head.is-expanded .tts-studio__filter-chevron {
    transform: rotate(180deg);
}

.tts-studio__filter-head:focus-visible {
    outline: 2px solid #cfe0ff;
    outline-offset: 2px;
}

.tts-studio #filter-box {
    flex: none;
    padding: 2px 20px 8px;
}

.tts-studio #filter-box.is-hidden {
    display: none;
}

.tts-studio .__sound-filter {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 0;
    border: 0;
}

.tts-studio .__sound-filter__label {
    flex: 0 0 42px;
    width: 42px;
    margin: 0;
    padding: 4px 0 0;
    font-size: 12.5px;
    line-height: 18px;
    color: #98a2b3;
}

.tts-studio .__sound-filter__value {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #c5d7ef #f4f8ff;
}

.tts-studio .__sound-filter__value::-webkit-scrollbar {
    height: 5px;
    display: block;
}

.tts-studio .__sound-filter__value::-webkit-scrollbar-track {
    background: #f4f8ff;
    border-radius: 3px;
}

.tts-studio .__sound-filter__value::-webkit-scrollbar-thumb {
    background: #c5d7ef;
    border-radius: 3px;
}

.tts-studio .__sound-filter__value::-webkit-scrollbar-thumb:hover {
    background: #a9c4e8;
}

.tts-studio .__sound-filter__value .__sound-filter__item {
    flex: none;
    padding: 3px 8px;
    margin: 0;
    border: 0;
    border-radius: 6px;
    color: #667085;
    font-size: 12.5px;
    line-height: 18px;
    white-space: nowrap;
}

.tts-studio .__sound-filter__value .__sound-filter__item:hover {
    color: var(--color-primary);
    background: #f5f9ff;
}

.tts-studio .__sound-filter__value .__sound-filter__item.active {
    color: var(--color-primary);
    background: #edf4ff;
    font-weight: 600;
}

.tts-studio .__sound-list__wrap {
    flex: 1;
    min-height: 0;
    height: auto;
    padding: 20px 20px 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

.tts-studio .__sound-list__wrap .layui-flow-more {
    grid-column: 1 / -1;
    display: block;
    padding: 6px 0;
    color: #98a2b3;
    font-size: 12.5px;
    text-align: center;
    line-height: 28px;
    background: none;
}

.tts-studio .__sound-list__wrap .layui-flow-more a {
    color: #98a2b3;
}

.tts-studio .__sound-list {
    display: contents;
}

.tts-studio .__sound-list .radio {
    width: auto;
    height: auto;
    float: none;
    padding: 0;
    border: 1px solid #ebf1fa;
    border-radius: 8px;
    background: #fff;
    overflow: visible;
    transition: all .2s ease;
}

.tts-studio .__sound-list .radio:hover {
    border-color: #cfe0ff;
    box-shadow: 0 8px 18px rgba(61, 126, 255, .08);
}

.tts-studio .__sound-list .__volice {
    /* min-height: 102px; */
    height: auto;
    padding: 15px 10px 12px;
    gap: 8px;
    align-items: flex-start;
    background: #fff;
    border: 0;
    border-radius: 8px;
}

.tts-studio .__sound-list .radio.active .__volice {
    background: #f5f9ff;
    border: 0;
}

.tts-studio .__sound-list .__volice-image {
    flex: none;
    /* width: 44px; */
    /* height: 44px; */
    margin-top: 3px;
    border-radius: 50%;
}

.tts-studio .__sound-list .__volice-title {
    margin: 0;
    padding-top: 2px;
    min-width: 0;
    flex: 1;
}

.tts-studio .__sound-list .__volice-title h3 {
    margin: 0 0 9px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: #1d2939;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tts-studio .tags-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
}

.tts-studio .tags-group .tag {
    margin: 0 !important;
    padding: 0 4px;
    border-radius: 3px;
    background: #f2f5fa;
    color: #7a8699;
    font-size: 10px;
    line-height: 18px;
    font-weight: 500;
    white-space: nowrap;
}

.tts-studio .tags-group .tag-0 {
    background: #e9e3ff;
    color: #6c5ce7;
}

.tts-studio .tags-group .tag-1 {
    background: #ffe9d8;
    color: #f57c1f;
}

.tts-studio .tags-group .tag-2 {
    background: #dcebff;
    color: #1a83ff;
}

.tts-studio .voice-featured-badge {
    position: absolute;
    top: -8px;
    left: -1px;
    right: auto;
    z-index: 4;
    width: auto;
    height: auto;
    padding: 1px 10px;
    border-radius: 9px;
    background: #ff7a7a;
    color: #fff;
    font-size: 11px;
    line-height: 17px;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 2px 6px rgba(255, 122, 122, .24);
    transform: none;
}

.tts-studio .__sound-list .radio .__emotion-status {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: 58px;
    height: 58px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0 8px 0 0;
    overflow: hidden;
    background: none;
    color: transparent;
    font-size: 0;
    line-height: 0;
    text-align: center;
    transform: none;
    z-index: 3;
}

.tts-studio .__sound-list .radio .__emotion-status::before {
    content: "情绪";
    position: absolute;
    top: 10px;
    right: -24px;
    width: 84px;
    padding: 1px 0;
    background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
    color: #fff;
    font-size: 11px;
    line-height: 17px;
    font-weight: 500;
    text-align: center;
    transform: rotate(45deg);
}

/* ---------- 我的收藏 ---------- */
.tts-studio #__voice-list .tts-studio__collect-pane {
    display: none;
}

.tts-studio #__voice-list.is-collect .tts-studio__collect-pane {
    position: relative;
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.tts-studio__collect-empty {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 42%;
    color: #98a2b3;
    font-size: 13px;
    text-align: center;
}

.tts-studio #__voice-list.is-collect .tts-studio__collect-empty {
    display: block;
}

.tts-studio #__collect-list:has(.__collect-item)~.tts-studio__collect-empty {
    display: none;
}

/* 收藏为空时，列表里只剩 flow 的“没有更多了”条，不需要展示 */
.tts-studio #__collect-list:not(:has(.__collect-item)) .layui-flow-more {
    display: none;
}

.tts-studio #__voice-list.is-collect .__sound-list-wrap {
    display: none;
}

.tts-studio #__voice-list.is-collect .__collect-voice__label {
    display: none;
}

.tts-studio #__collect-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    padding: 16px 20px;
}

.tts-studio .__collect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e9f0fb;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: all .2s ease;
}

.tts-studio .__collect-item:hover {
    border-color: #cfe0ff;
    box-shadow: 0 6px 14px rgba(61, 126, 255, .08);
}

.tts-studio .__collect-item__image {
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0;
    border-width: 1px;
}

.tts-studio .__collect-item__name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #1d2939;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tts-studio .__collect-item::after {
    content: "已收藏";
    flex: none;
    padding: 0 6px;
    border-radius: 3px;
    background: #fff3e6;
    color: #d97706;
    font-size: 10px;
    line-height: 18px;
}

.tts-studio #__collect-list .layui-flow-more {
    grid-column: 1 / -1;
    float: none;
    width: 100%;
    padding: 4px 0;
    background: none;
    color: #98a2b3;
    font-size: 12px;
    line-height: 28px;
    text-align: center;
}

.tts-studio #__collect-list .layui-flow-more a {
    color: #98a2b3;
    font-size: 12px;
}

.tts-studio .__collect-none {
    grid-column: 1 / -1;
    padding: 40px 0;
    color: #98a2b3;
}

/* ---------- 编辑区 ---------- */
.tts-studio .ai-sound__bot {
    display: block;
    height: 100%;
    min-height: 0;
}

.tts-studio .ai-sound__edit {
    height: 100%;
    padding: 0;
}

.tts-studio .ai-sound__edit>.field-box {
    height: 100%;
}

.tts-studio .ai-sound__edit .inline-control {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.tts-studio .mxs-editor {
    flex: 1;
    width: 100%;
    min-height: 0;
    height: auto;
    /* border: 1px solid #e6eefb; */
    /* border-radius: 14px; */
    /* background: #fff; */
    overflow: hidden;
}

.tts-studio .tts-editor__body {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
}

.tts-studio .tts-editor {
    width: 100%;
    height: 100% !important;
    padding: 22px 24px 80px;
    border: 0;
    border-radius: 14px;
    /* background: #fff; */
    font-size: 15px;
    line-height: 2.1;
    color: #1d2939;
    box-sizing: border-box;
}

.tts-studio .tts-editor:empty::before {
    color: #b6c2d4;
}

.tts-studio .tts-ai__tips {
    left: 18px;
    bottom: 16px;
    padding: 4px 10px;
    border-radius: 14px;
    background: #f4f7fc;
    color: #98a2b3;
    font-size: 12px;
    line-height: 18px;
}

.tts-studio .tts-ai__tips .icon {
    width: 14px;
    height: 14px;
}

.tts-studio .tts-count {
    left: auto;
    right: 18px;
    bottom: 16px;
    padding: 0;
    color: #98a2b3;
    font-size: 12px;
    line-height: 18px;
}

.tts-studio .ai-sound__edit .actions {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}
.ai-sound__edit .inline-control{
    border-radius: 15px !important;
}
.tts-studio .ai-sound__edit .actions .mxs-btn {
    width: auto;
    min-width: 132px;
    height: 46px;
    margin: 0;
    padding: 0 26px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 44px;
    box-shadow: none;
}

.tts-studio .actions input.mxs-btn[lay-filter="form_submit"] {
    border: 0;
    background: linear-gradient(90deg, #3d7eff 0%, #4babf7 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(61, 126, 255, .22);
}

.tts-studio .actions .mxs-btn__shape {
    border: 1px solid #cfe0ff;
    background: #fff;
    color: var(--color-primary);
}

.tts-studio .actions .layui-form-checkbox[lay-skin="primary"] {
    margin-left: 6px;
    font-size: 13px;
    color: #667085;
}

.tts-studio .actions .layui-form-checkbox[lay-skin="primary"] i {
    border-color: #cfe0ff;
}

.tts-studio .actions .layui-form-checked[lay-skin="primary"] i {
    border-color: var(--color-primary) !important;
    background-color: var(--color-primary);
}

@media (min-width: 1800px) {
    .tts-studio .tags-group .tag {
        font-size: 11px;
        padding: 0 6px;
    }
}

@media (max-width: 1499px) {
    .tts-studio .g-tool__in {
        margin-left: 210px;
    }

    .tts-studio .tts-tools {
        left: 220px;
    }

    .tts-studio .tts-tools__btn {
        padding: 0 8px;
    }

    .tts-studio .tts-tools__title {
        font-size: 11px;
    }

    .tts-studio .__voice-modal__body {
        padding: 16px;
    }

    .tts-studio .ai-sound__in {
        grid-template-columns: minmax(0, 1fr) clamp(440px, 36%, 560px) 300px;
    }

    .tts-studio .__voice-modal .__emotion-list .__emotion-item {
        width: 36px;
        height: 36px;
        margin: 4px;
    }

    .tts-studio .__sound-filter__label {
        flex-basis: 38px;
        width: 38px;
    }
}
