/* =========================================================
   TOOLMIVO — TEXT TOOLS
   Shared styles for text utilities.
   ========================================================= */

.text-tool-page{
  --tt-panel:#101d31;
  --tt-panel2:#13233b;
  --tt-text:#f7f9ff;
  --tt-muted:#97a8c2;
  --tt-line:rgba(255,255,255,.09);
  --tt-line-strong:rgba(255,255,255,.15);
  --tt-accent:#7c5cff;
  --tt-accent2:#3b82f6;
  --tt-accent3:#21d4c2;

  position:relative;
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
  padding:52px 0 80px;
  color:var(--tt-text);
}

.text-tool-page::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:-120px;
  left:50%;
  width:800px;
  height:420px;
  transform:translateX(-50%);
  border-radius:50%;
  background:radial-gradient(circle,rgba(124,92,255,.14),rgba(59,130,246,.06) 42%,transparent 72%);
  pointer-events:none;
}

.text-tool-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:30px;
  align-items:end;
  margin-bottom:24px;
}

.text-tool-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:13px;
  color:#aea2ff;
  font-size:.78rem;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.text-tool-kicker::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--tt-accent);
  box-shadow:0 0 14px rgba(124,92,255,.9);
}

.text-tool-page .text-tool-hero h1{
  margin:0;
  color:var(--tt-text);
  font-size:clamp(2.3rem,5vw,4rem);
  line-height:1.02;
  letter-spacing:-.05em;
}

.text-tool-hero p{
  max-width:760px;
  margin:17px 0 0;
  color:var(--tt-muted);
  font-size:1rem;
  line-height:1.72;
}

.text-tool-switch{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:7px;
  max-width:500px;
}

.text-tool-switch a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 13px;
  border:1px solid var(--tt-line);
  border-radius:11px;
  background:rgba(255,255,255,.025);
  color:var(--tt-muted);
  font-size:.75rem;
  font-weight:750;
  text-decoration:none;
  transition:.18s ease;
}

.text-tool-switch a:hover,
.text-tool-switch a.active{
  color:#fff;
  border-color:rgba(124,92,255,.42);
  background:linear-gradient(135deg,rgba(124,92,255,.2),rgba(59,130,246,.13));
}

.text-tool-card{
  overflow:hidden;
  border:1px solid var(--tt-line);
  border-radius:28px;
  background:linear-gradient(145deg,rgba(16,29,49,.98),rgba(11,22,40,.98));
  box-shadow:0 20px 55px rgba(0,0,0,.28);
}

.text-tool-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:22px 26px;
  border-bottom:1px solid var(--tt-line);
}

.text-tool-head h2{
  margin:0 0 5px;
  color:var(--tt-text);
  font-size:1.2rem;
}

.text-tool-head p{
  margin:0;
  color:var(--tt-muted);
  font-size:.82rem;
}

.text-tool-privacy{
  flex:0 0 auto;
  padding:8px 11px;
  border:1px solid rgba(33,212,194,.17);
  border-radius:999px;
  background:rgba(33,212,194,.06);
  color:#8ce7dd;
  font-size:.72rem;
  font-weight:750;
}

.text-workspace{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);
  min-height:560px;
}

.text-editor{
  padding:26px;
  border-right:1px solid var(--tt-line);
}

.text-side{
  padding:26px;
  background:linear-gradient(180deg,rgba(255,255,255,.012),rgba(0,0,0,.035));
}

.textarea-wrap{
  position:relative;
}

.textarea-wrap textarea{
  display:block;
  width:100%;
  min-height:330px;
  resize:vertical;
  padding:18px;
  border:1px solid var(--tt-line-strong);
  border-radius:18px;
  outline:none;
  background:#0d192b;
  color:var(--tt-text);
  font:inherit;
  font-size:.95rem;
  line-height:1.65;
  transition:border-color .18s ease,box-shadow .18s ease;
}

.textarea-wrap textarea:focus{
  border-color:rgba(124,92,255,.7);
  box-shadow:0 0 0 3px rgba(124,92,255,.1);
}

.textarea-wrap textarea::placeholder{
  color:#667995;
}

.text-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.text-btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border:1px solid transparent;
  border-radius:12px;
  font:inherit;
  font-size:.78rem;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
}

.text-btn:hover{transform:translateY(-1px)}
.text-btn:disabled{opacity:.38;cursor:not-allowed;transform:none}

.text-btn-primary{
  color:#fff;
  background:linear-gradient(135deg,var(--tt-accent),var(--tt-accent2));
  box-shadow:0 10px 26px rgba(82,83,255,.22);
}

.text-btn-secondary{
  border-color:var(--tt-line);
  background:rgba(255,255,255,.04);
  color:#d9e3f1;
}

.text-settings,
.text-side-card{
  padding:18px;
  border:1px solid var(--tt-line);
  border-radius:17px;
  background:rgba(255,255,255,.018);
}

.text-settings + .text-settings,
.text-side-card + .text-side-card{margin-top:14px}

.text-settings h3,
.text-side-card h3{
  margin:0 0 14px;
  color:var(--tt-text);
  font-size:.92rem;
}

.text-option{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 0;
  border-top:1px solid var(--tt-line);
  color:#c6d1e1;
  font-size:.8rem;
}

.text-option:first-of-type{border-top:0;padding-top:0}
.text-option:last-child{padding-bottom:0}

.text-option select{
  min-height:36px;
  padding:0 10px;
  border:1px solid var(--tt-line-strong);
  border-radius:10px;
  background:#0d192b;
  color:var(--tt-text);
}

.text-option input[type="checkbox"]{
  width:17px;
  height:17px;
  accent-color:var(--tt-accent);
}

.text-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}

.text-stat{
  padding:13px;
  border:1px solid var(--tt-line);
  border-radius:13px;
  background:rgba(255,255,255,.018);
}

.text-stat span{
  display:block;
  color:var(--tt-muted);
  font-size:.68rem;
}

.text-stat strong{
  display:block;
  margin-top:4px;
  color:var(--tt-text);
  font-size:1.05rem;
}

.text-message{
  min-height:20px;
  margin-top:12px;
  color:var(--tt-muted);
  font-size:.76rem;
}

.text-result{
  width:100%;
  min-height:240px;
  margin-top:14px;
  padding:15px;
  border:1px solid var(--tt-line);
  border-radius:14px;
  background:#0b1628;
  color:#dfe7f3;
  font:inherit;
  font-size:.85rem;
  line-height:1.6;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.text-info-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:20px;
}

.text-info-card{
  padding:20px;
  border:1px solid var(--tt-line);
  border-radius:17px;
  background:linear-gradient(145deg,rgba(16,29,49,.68),rgba(11,22,40,.72));
}

.text-info-card strong{
  display:block;
  color:var(--tt-text);
  font-size:.85rem;
}

.text-info-card p{
  margin:7px 0 0;
  color:var(--tt-muted);
  font-size:.76rem;
  line-height:1.62;
}

@media(max-width:900px){
  .text-tool-hero{grid-template-columns:1fr;align-items:start}
  .text-tool-switch{justify-content:flex-start;max-width:none}
  .text-workspace{grid-template-columns:1fr}
  .text-editor{border-right:0;border-bottom:1px solid var(--tt-line)}
}

@media(max-width:680px){
  .text-tool-page{width:min(100% - 22px,1180px);padding-top:34px}
  .text-tool-switch{flex-wrap:nowrap;overflow:auto;padding-bottom:4px}
  .text-tool-switch a{flex:0 0 auto}
  .text-tool-head{align-items:flex-start;flex-direction:column;padding:20px}
  .text-editor,.text-side{padding:18px}
  .text-info-grid{grid-template-columns:1fr}
  .textarea-wrap textarea{min-height:280px}
}

@media(max-width:460px){
  .text-toolbar{display:grid;grid-template-columns:1fr}
  .text-btn{width:100%}
}