/* ============================================================
   Maxima glass container – БАЗА (без фон)
   ============================================================ */
   .maxima-sl__inner{
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    padding:10px 14px;
    border:1px solid rgba(0,0,0,.25);
    border-radius:16px;
    /* без background тук, за да не влияе глобално */
    backdrop-filter:saturate(120%) blur(8px);
  }
  
  /* Контейнер на модула – наследява шрифта на сайта */
  .mx-tasks{
    overflow-x:hidden;
    font-family: var(--wp--preset--font-family--raleway, "Raleway"),
                 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }
  
  /* ============================================================
     Заглавие на блока
     ============================================================ */
  .mx-tasks__header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
  }
  .mx-tasks__title{
    font-family: inherit;
    font-weight: 700;      /* изискване */
    font-size: 24px;       /* изискване */
    line-height: 1.2;
    margin: 0 0 2px 0;
  }
  
  /* ============================================================
     Главни задачи – компактно
     ============================================================ */
  .mx-tasks__list{
    list-style:none;
    margin:6px 0 0;
    padding:0;
  }
  .mx-tasks__item + .mx-tasks__item{ margin-top:6px; }
  
  /* Ред на главна задача – Grid */
  .mx-tasks__row{
    box-sizing:border-box;
    display:grid;
    grid-template-columns:18px 18px 1fr 22px 22px; /* drag, chk, text, +, × */
    align-items:center;
    gap:0;
    padding:2px 6px !important;   /* вертикален въздух около текста */
    min-height:0 !important;
    min-width:0;                  /* избягва overflow */
    border:1px solid rgba(0,0,0,.2);
    border-radius:6px;
    background: rgba(255,255,255,0.5); /* лек матиран фон */
    /* премахваме глобално удебеляване от реда – ще зададем само на текстовото поле */
    font-weight: normal !important;
  }
  
  /* Дръжка и чекбокс */
  .mx-drag{
    cursor:grab;
    user-select:none;
    font-weight:700;
    opacity:.55;
    line-height:1!important;
    margin-right:0;
  }
  .mx-tasks__chk{
    margin:0 6px 0 0;
    transform:scale(1);
    accent-color:#28a745;
    line-height:1!important;
  }
  
  /* ============================================================
     Текстови полета – пренасяне и мобилен свиващ се текст
     ============================================================ */
  .mx-tasks__text,
  .mx-subtasks__text{
    display:block;
    width:100%;
    min-width:0;                 /* да може да се свива в Grid */
    border:none!important;
    outline:none!important;
    box-shadow:none!important;
    background:transparent!important;
    -webkit-appearance:none; appearance:none;
  
    padding:2px 2px!important;   /* вертикално 2px */
    margin:0!important;
    line-height:1.35!important;  /* по-четимо на 20px */
    min-height:0!important;
    height:auto;                 /* autosize JS управлява височината */
    overflow:hidden;
    resize:none;
  
    font-family: inherit;
    font-size: 20px;             /* изискване: текст в полетата 20px */
    color:#000;
  
    /* пренасяне на дълги думи/линкове, за да няма хор. скрол */
    word-wrap:break-word;
    overflow-wrap:anywhere;
  }
  
  /* Изискване: главните задачи да са с weight 600 */
  .mx-tasks__text{ font-weight:510; }
  /* Подзадачите остават нормални (можеш да смениш на 500 при нужда) */
  .mx-subtasks__text{ font-weight:400; }
  
  /* Контроли в реда */
  .mx-tasks__add-sub,
  .mx-tasks__del,
  .mx-subtasks__del{
    border:none;
    background:transparent;
    font-size:16px;
    line-height:1!important;
    cursor:pointer;
    opacity:.75;
    padding:0;
  }
  .mx-tasks__add-sub:hover,
  .mx-tasks__del:hover,
  .mx-subtasks__del:hover{ opacity:1; }
  
  /* Изпълнени редове – мек зелен фон */
  .mx-tasks__item.is-done .mx-tasks__row,
  .mx-subtasks__item.is-done .mx-subtasks__row{
    background:rgba(40,167,69,0.1);
  }
  
  /* ============================================================
     Подзадачи – компактни и по-надясно
     ============================================================ */
  .mx-subtasks{
    margin:6px 0 0 16px;  /* изместване надясно */
  }
  
  .mx-subtasks__header{
    margin:2px 0;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    height:14px;
    line-height:1;
  }
  .mx-subtasks__toggle{
    border:none;
    background:transparent;
    padding:0;
    margin:0;
    cursor:pointer;
    line-height:1;
    font-size:14px;
    color:#000;
    transition:transform .2s ease, opacity .2s ease;
  }
  .mx-subtasks__toggle:hover{
    transform:translateX(1px);
    opacity:.85;
  }
  
  .mx-subtasks__list{
    list-style:none;
    margin:0;
    padding:0;
  }
  .mx-subtasks__item + .mx-subtasks__item{ margin-top:4px; }
  
  /* Ред на подзадача – Grid */
  .mx-subtasks__row{
    box-sizing:border-box;
    display:grid;
    grid-template-columns:18px 18px 1fr 22px; /* drag, chk, text, × */
    align-items:center;
    gap:0;
    padding:2px 4px!important;
    min-height:0!important;
    min-width:0;
    border:1px solid rgba(0,0,0,.2);
    border-radius:10px;
    background: rgba(255,255,255,.5); /* по-ефирен */
  }
  
  .mx-subtasks__chk{
    margin:0 6px 0 0;
    transform:scale(.96);
    accent-color:#28a745;
    line-height:1!important;
  }
  
  /* ============================================================
     Footer + бутон "+ Добави задача"
     ============================================================ */
  .mx-tasks__footer{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:10px;
  }
  .mx-tasks__add-main{
    display:inline-block;
    padding:6px 10px;
    border:0;
    border-radius:6px;
    background:#00000020;
    color:#000;
    font-size:16px;
    font-weight:400;
    line-height:1.1;
    cursor:pointer;
    backdrop-filter: blur(2px) saturate(110%);
    -webkit-backdrop-filter: blur(2px) saturate(110%);
    transition: background .2s ease, transform .1s ease;
  }
  .mx-tasks__add-main:hover{ background:#00000030; }
  .mx-tasks__add-main:active{ background:#00000040; transform:scale(0.98); }
  .mx-tasks__add-main:focus-visible{
    outline:2px solid #00000030;
    outline-offset:2px;
  }
  .mx-tasks__status{ display:none; }
  
  /* ============================================================
     Drag visuals
     ============================================================ */
  .mx-tasks__item.dragging,
  .mx-subtasks__item.dragging{
    opacity:.92;
  }
  
  /* ============================================================
     Глобални „killers“ – гаранция срещу чужди стилове
     ============================================================ */
  .mx-tasks__row *,
  .mx-subtasks__row *{
    box-sizing:border-box;
  }
  
  .mx-tasks__row textarea,
  .mx-subtasks__row textarea{
    border:none!important;
    outline:none!important;
    box-shadow:none!important;
    padding-top:0!important;
    padding-bottom:0!important;
    margin-top:0!important;
    margin-bottom:0!important;
    min-height:0!important;
  }
  