#text-studio.customer-text-studio{padding:30px;border:1px solid #e1e5ed;border-radius:28px;background:#fff}
.customer-text-studio .section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:24px}
.customer-text-studio h2{margin:0;font-size:27px;line-height:1.2}
.customer-text-studio .section-head p{font-size:14px;line-height:1.6;color:#7d8798}
.customer-text-studio label{display:grid;gap:9px;font-size:14px;font-weight:500;color:#4c5a6c;min-width:0}
.customer-text-studio input:not([type=checkbox]),.customer-text-studio textarea,.customer-text-studio select{width:100%;min-width:0;padding:12px 14px;border:1px solid #dfe5ef;border-radius:14px;background:#fff;color:#26364d;font:inherit;font-weight:400}
.customer-text-studio textarea{resize:vertical;line-height:1.65}
.customer-text-studio button{min-height:40px;padding:10px 15px;border:1px solid #e0e5ed;border-radius:14px;background:#fff;color:#33445b;font:inherit;font-size:13px;cursor:pointer}
.customer-text-studio button.primary{border-color:transparent;background:#7938ee;color:#fff;font-weight:600;box-shadow:0 2px 4px #7938ee18}
.customer-text-studio button:disabled{opacity:.5;cursor:default}
.customer-text-studio .ts-prompt[hidden],.customer-text-studio .ts-access[hidden]{display:none}
.customer-text-studio .ts-transfer-choice{display:flex;align-items:center;gap:9px;font-size:14px}
.customer-text-studio .ts-transfer-choice input{width:18px;height:18px;accent-color:#7938ee}
.customer-text-studio #ts-reset-dialog{width:min(480px,calc(100vw - 32px));margin:auto;padding:26px;border:1px solid #e0e5ed;border-radius:24px}
.customer-text-studio #ts-reset-dialog::backdrop{background:#20242b66}
.deal-media-generated-label{margin:10px 0;color:#77559b;font-size:13px;line-height:1.5}
@media(max-width:760px){
  #text-studio.customer-text-studio{padding:18px 12px;border-radius:23px}
  .customer-text-studio .section-head{flex-wrap:wrap}
  .customer-text-studio h2{font-size:23px}
  .customer-text-studio .ts-stage>header,.customer-text-studio .ts-inputs{padding:14px}
  .customer-text-studio .ts-output{padding:0 14px 14px}
}

.deal-media-generation #text-studio.customer-text-studio{padding:0;border:0;border-radius:0}
.deal-media-tabs:has([data-tab="generation"]){width:100%;max-width:100%}
.deal-media-tabs:has([data-tab="generation"]) button[data-tab]{flex:1 1 0;min-width:0}
@media(max-width:650px){.deal-media-tabs:has([data-tab="generation"]) button[data-tab]{font-size:12px;padding:10px 6px}}
.customer-text-studio .ts-stage{display:none}
.customer-text-studio #ts-gender:has(.ts-text){display:block;border:0;margin-top:28px;overflow:visible}
.customer-text-studio #ts-gender:has(.ts-customer-empty){display:block}
.customer-text-studio #ts-gender>header,.customer-text-studio #ts-gender>.ts-inputs,.customer-text-studio #ts-gender>.ts-status{display:none}
.customer-text-studio #ts-gender>.ts-output{padding:0}
.customer-text-studio .ts-customer-form>fieldset{border:0;padding:0;margin:0;min-width:0}
.customer-text-studio .ts-customer-style{margin-top:26px}
.customer-text-studio .ts-customer-style h3{font-size:20px;margin:0 0 20px}
.customer-text-studio .ts-customer-style .review-style-controls fieldset{padding:0;border:0;margin:0 0 20px;min-width:0}
.customer-text-studio .ts-customer-style .review-style-controls legend{font-size:14px;font-weight:600;margin-bottom:10px}
.customer-text-studio .ts-customer-style .review-style-controls legend small{font-size:12px;font-weight:400;color:#939aaa}
.customer-text-studio .ts-customer-style .review-style-tiles{display:flex;flex-wrap:wrap;gap:8px}
.customer-text-studio .ts-customer-style .review-style-tile[aria-pressed=true]{background:#f0eaff;border-color:#b9a2ec;color:#7044bb}
.customer-text-studio .ts-customer-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:20px 0}
.customer-text-studio .ts-customer-history{margin-top:24px;border-top:1px solid #edf0f5;padding-top:18px}
.customer-text-studio .ts-customer-history summary{cursor:pointer;color:#718097;font-size:14px}
.customer-text-studio .ts-customer-history .ts-history{margin-top:14px}
.customer-text-studio #ts-auto-status{font-size:14px;line-height:1.6;color:#5c6a80}
.customer-text-studio #ts-auto-status.is-error{color:#ae3d47}
.customer-text-studio #ts-auto-status:empty{display:none}
@media(max-width:650px){.customer-text-studio .ts-customer-actions .primary{width:100%}.customer-text-studio .ts-customer-style legend small{display:block;margin-top:4px}}
.customer-text-studio .ts-customer-review{position:relative;padding:20px;border:1px solid #e1e3e9;border-radius:22px;background:#f5f6f8}
.customer-text-studio .ts-customer-review h4{margin:0 42px 0 0;font-size:16px;font-weight:600;color:#202936}
.customer-text-studio .ts-customer-review .ts-customer-remove{position:absolute;top:16px;right:16px;display:grid;place-items:center;width:32px;min-height:32px;height:32px;padding:0;border-radius:50%;font-size:22px;color:#7c889c;background:#fff}
.customer-text-studio .ts-customer-review .ts-customer-gender{display:flex;align-items:center;gap:10px;margin:16px 0 14px;font-size:13px;color:#7b8798;font-weight:400}
.customer-text-studio .ts-customer-review select[data-author-gender]{width:134px;padding:10px 12px;font-size:14px;min-height:42px}
.customer-text-studio .ts-customer-review .ts-customer-body{margin:0}
.customer-text-studio .ts-customer-review textarea{min-height:130px;padding:15px 17px;background:#fff;border-color:#dce1e8;border-radius:18px;line-height:1.6;font-size:14px}
.customer-text-studio .ts-customer-card-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:18px}
.customer-text-studio .ts-customer-card-actions button{background:transparent;font-size:13px;color:#6d7a90}
.customer-text-studio .ts-customer-card-actions span{font-size:12px;color:#8390a3}
.customer-text-studio .ts-customer-card-actions .ts-approved-note{color:#318557;font-size:13px}
.customer-text-studio .ts-customer-card-actions .ts-example-note{flex-basis:100%}
.customer-text-studio .ts-approval-banner{position:fixed;top:auto;bottom:24px;left:50%;width:min(780px,calc(100vw - 40px));box-sizing:border-box;z-index:30;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 18px;margin:0;padding:16px 20px;background:#303840;border:1px solid #4b5662;border-radius:18px;color:#f5f7fa;font-size:14px;font-weight:500;line-height:1.6;box-shadow:0 12px 40px #18243140;opacity:0;transform:translate(-50%,calc(100% + 32px));pointer-events:none;transition:transform .25s ease-out,opacity .2s ease-out}
.customer-text-studio .ts-approval-banner.is-visible{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.customer-text-studio .ts-approval-count{display:inline-block;min-width:26px;padding:0 6px;margin:0 2px;border-radius:6px;background:#ffe4a3;color:#4f3b0f;text-align:center;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
.customer-text-studio .ts-approval-banner button{flex-shrink:0;min-height:44px;background:#fff;border-color:#fff;color:#273440;font-weight:600}
@media(hover:hover) and (pointer:fine){.customer-text-studio .ts-approval-banner button:hover:not(:disabled){background:#edf2f6;border-color:#edf2f6}}
@media(max-width:650px){.customer-text-studio .ts-approval-banner{bottom:max(16px,env(safe-area-inset-bottom));width:calc(100vw - 24px);padding:14px}.customer-text-studio .ts-approval-banner button{width:100%}}
@media(prefers-reduced-motion:reduce){.customer-text-studio .ts-approval-banner{transition:none}}
@media(max-width:650px){.customer-text-studio .ts-customer-review{padding:18px 14px}.customer-text-studio .ts-customer-review .ts-customer-remove{top:12px;right:12px}}
.customer-text-studio #ts-files{padding:4px;border:0;border-radius:14px;background:transparent;color:#8b93a0;font-size:14px;line-height:1.5;cursor:pointer}
.customer-text-studio #ts-files::file-selector-button{margin-right:14px;padding:12px 18px 12px 43px;min-height:46px;border:1px solid #e0e3e9;border-radius:14px;background:#eef0f3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23687180' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V3m-5 5 5-5 5 5M4 16v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E") no-repeat 15px center;color:#30343b;font:inherit;font-weight:500;cursor:pointer;transition:background-color .16s ease,border-color .16s ease}
@media(hover:hover) and (pointer:fine){.customer-text-studio #ts-files:hover::file-selector-button{background-color:#e5e8ed;border-color:#d4d9e1}}
.customer-text-studio #ts-files:disabled{cursor:default;opacity:.55}
@media(prefers-reduced-motion:reduce){.customer-text-studio #ts-files::file-selector-button{transition:none}}
.customer-text-studio .ts-customer-card-actions button.primary{background:#30343b;color:#fff;box-shadow:0 2px 4px #30343b12}
@media(hover:hover) and (pointer:fine){.customer-text-studio .ts-customer-review:not(.is-approved) .ts-customer-card-actions button.primary:hover:not(:disabled){background:#424750}}
.customer-text-studio [hidden]{display:none!important}
@media(max-width:650px){.customer-text-studio .ts-customer-card-actions button.primary{width:100%}}
.customer-text-studio.is-processing .ts-customer-form{padding:26px 0}
.customer-text-studio .ts-customer-review.is-approved{background:#edf8f0;border-color:#c7e6d0}
.customer-text-studio .ts-customer-review.is-approved button.primary:disabled{background:#318557;border-color:#318557;color:#fff;opacity:1;box-shadow:none}
.customer-text-studio .ts-customer-review.is-approved button.primary:before{content:'✓';margin-right:7px}
.customer-text-studio .ts-customer-review.is-approved textarea{border-color:#d3e6da;color:#345344;-webkit-text-fill-color:#345344;opacity:1}
.customer-text-studio.is-approving .ts-customer-review:not(.is-saving):not(.is-approved) :disabled{opacity:1;-webkit-text-fill-color:currentColor}

.customer-text-studio .ts-generate-control{position:relative;display:inline-flex;isolation:isolate}
.customer-text-studio #ts-generate-all{min-height:48px;padding:13px 22px;background:#318557;box-shadow:0 2px 4px #31855718;transition:background-color .16s ease,transform .16s ease}
.customer-text-studio #ts-generate-all:focus,.customer-text-studio #ts-generate-all:focus-visible{outline:none;border-color:transparent;transform:scale(1.025)}
@media(hover:hover) and (pointer:fine){.customer-text-studio #ts-generate-all:hover:not(:disabled){transform:scale(1.025)}}
.customer-text-studio .ts-generate-control:has(#ts-generate-all:is(:hover,:focus,:active)) .ts-magic i{animation-duration:1.5s}
.customer-text-studio .ts-generate-control:has(#ts-generate-all:is(:hover,:focus,:active)) .ts-magic i:nth-child(4n+1){background:#68bb8b}
.customer-text-studio .ts-generate-control:has(#ts-generate-all:is(:hover,:focus,:active)) .ts-magic i:nth-child(4n+2){background:#69a7ef}
.customer-text-studio .ts-generate-control:has(#ts-generate-all:is(:hover,:focus,:active)) .ts-magic i:nth-child(4n+3){background:#b28be1}
.customer-text-studio .ts-generate-control:has(#ts-generate-all:is(:hover,:focus,:active)) .ts-magic i:nth-child(4n){background:#e6b05c}
@media(prefers-reduced-motion:reduce){.customer-text-studio #ts-generate-all:focus,.customer-text-studio #ts-generate-all:focus-visible,.customer-text-studio #ts-generate-all:hover{transform:none}}
.customer-text-studio #ts-generation-time{font-size:13px;line-height:1.5;color:#7d8798;margin-left:8px}
.customer-text-studio .ts-magic{position:absolute;inset:0;pointer-events:none;z-index:1}
.customer-text-studio .ts-generate-control:has(button:disabled) .ts-magic{display:none}
@keyframes ts-magic-float{0%{opacity:0;transform:translate(0,5px) scale(.65) rotate(0)}18%{opacity:.8}65%,100%{opacity:0;transform:translate(var(--magic-x),-20px) scale(.9) rotate(70deg)}}
.customer-text-studio .ts-steps{gap:20px}
.customer-text-studio .ts-steps li,.customer-text-studio .ts-steps li.is-active,.customer-text-studio .ts-steps li.is-done{display:block;padding:0;border:0;border-radius:0;background:transparent;min-width:0}
.customer-text-studio .ts-steps li>span{display:none}
.customer-text-studio .ts-steps strong{font-weight:600;color:#455164;font-size:13px}
.customer-text-studio .ts-steps small{min-height:17px;color:#8a929f}
.customer-text-studio .ts-step-progress{height:7px;border-radius:10px;background:#eceef1;overflow:hidden;margin-top:12px}
.customer-text-studio .ts-step-progress>span{display:block;width:100%;height:100%;border-radius:inherit;background:#9ba3ae;transform:scaleX(0);transform-origin:left}
.customer-text-studio .ts-steps .is-active .ts-step-progress>span{animation:ts-stage-fill 65s cubic-bezier(.15,.55,.35,1) forwards}
.customer-text-studio .ts-steps .is-done:not(.is-active) .ts-step-progress>span{background:#318557;transform:scaleX(1)}
@keyframes ts-stage-fill{from{transform:scaleX(.03)}to{transform:scaleX(.92)}}
@media(hover:hover) and (pointer:fine){.customer-text-studio #ts-generate-all:hover:not(:disabled){background:#287449}}
@media(max-width:720px){.customer-text-studio .ts-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}}
@media(prefers-reduced-motion:reduce){.customer-text-studio .ts-magic{display:none}.customer-text-studio #ts-generate-all{transition:none}.customer-text-studio .ts-steps .is-active .ts-step-progress>span{animation:none;transform:scaleX(.5)}}

.customer-text-studio .ts-upload{border:1px solid #e1e5eb;background:#f8f9fb}
.customer-text-studio .ts-magic i{position:absolute;display:block;width:4px;height:4px;border-radius:50%;background:#74b994;opacity:0;animation:ts-magic-float 2.1s ease-out infinite}
.customer-text-studio .ts-magic i:nth-child(1){left:9%;top:0;--magic-x:-9px}
.customer-text-studio .ts-magic i:nth-child(2){left:28%;top:2px;--magic-x:6px;animation-delay:.25s;width:3px;height:3px}
.customer-text-studio .ts-magic i:nth-child(3){left:48%;top:-1px;--magic-x:-4px;animation-delay:.5s}
.customer-text-studio .ts-magic i:nth-child(4){left:70%;top:0;--magic-x:8px;animation-delay:.75s;width:3px;height:3px}
.customer-text-studio .ts-magic i:nth-child(5){right:7%;top:4px;--magic-x:7px;animation-delay:1s}
.customer-text-studio .ts-magic i:nth-child(6){left:-1px;top:50%;--magic-x:-8px;animation-delay:1.25s;width:3px;height:3px}
.customer-text-studio .ts-magic i:nth-child(7){right:-1px;top:55%;--magic-x:9px;animation-delay:1.5s;width:3px;height:3px}
.customer-text-studio .ts-magic i:nth-child(8){left:57%;top:0;--magic-x:5px;animation-delay:1.75s}
.customer-text-studio #ts-auto-status.is-error:not(:empty),.customer-text-studio #ts-notice.is-error:not(:empty){box-sizing:border-box;width:100%;margin:20px 0 16px;padding:16px 20px;border:1px solid #efc8c6;border-radius:14px;background:#fff3f2;color:#963f3c;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.customer-text-studio #ts-auto-status.is-error:not(:empty)::before,.customer-text-studio #ts-notice.is-error:not(:empty)::before{display:block;margin-bottom:5px;font-size:14px;font-weight:700;color:#813634}
.customer-text-studio #ts-auto-status.is-error:not(:empty)::before{content:'Не удалось завершить генерацию'}
.customer-text-studio #ts-notice.is-error:not(:empty)::before{content:'Обратите внимание'}
@media(max-width:650px){.customer-text-studio #ts-auto-status.is-error:not(:empty),.customer-text-studio #ts-notice.is-error:not(:empty){padding:14px 16px}}
.customer-text-studio .ts-generation-heading{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px}
.customer-text-studio .ts-model-brands{display:flex;align-items:center;flex-wrap:wrap;gap:16px}
.customer-text-studio .ts-model-brand{display:inline-flex;align-items:center;gap:6px;color:#657182;font-size:12px;font-weight:500;line-height:1;white-space:nowrap}
.customer-text-studio .ts-model-brand svg{display:block;flex:none;width:22px;height:22px}
.customer-text-studio .ts-model-brand:first-child svg{color:#24292e}
@media(max-width:650px){.customer-text-studio .ts-generation-heading{gap:12px}.customer-text-studio .ts-model-brands{gap:14px}.customer-text-studio .ts-model-brand svg{width:20px;height:20px}}
.customer-text-studio .ts-gender-review-note{margin:0;padding:12px 15px;border:1px solid #efd7a1;border-radius:12px;background:#fff8e9;color:#86621f;font-size:13px;line-height:1.55}
.customer-text-studio .ts-steps .needs-review .ts-step-progress>span{background:#c99a3b}
.customer-text-studio .ts-steps .needs-review small{color:#956e26}
