/* TuneWrap Stage 12.10.4 — Compact Desktop Package Chooser */

/*
Root cause:
.tw-package-choice-group is a <section>. Global TuneWrap section sizing can give
each package group screen-like vertical space. That creates the large empty gap
between "Песни" and "Свадебные форматы".

This hotfix explicitly makes chooser groups content-sized and compacts the
desktop/tablet dialog. Package logic and mobile selection behavior stay intact.
*/

.tw-package-chooser-shell .tw-package-choice-group{
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
}

.tw-package-chooser-shell .tw-package-choice-group + .tw-package-choice-group{
  margin-top:12px!important;
}

.tw-package-chooser-shell .tw-package-chooser-scroll{
  min-height:0!important;
  height:auto!important;
  align-content:start!important;
}

/* Desktop: one compact premium window, six cards kept together. */
@media(min-width:901px){
  .tw-package-chooser-shell{
    width:min(820px,calc(100vw - 56px))!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 80px)!important;
    grid-template-rows:auto auto!important;
    border-radius:20px!important;
  }

  .tw-package-chooser-head{
    min-height:58px!important;
    padding:9px 12px 9px 16px!important;
  }

  .tw-package-chooser-kicker{
    margin-bottom:2px!important;
    font-size:7px!important;
  }

  .tw-package-chooser-head h2{
    font-size:25px!important;
  }

  .tw-package-chooser-close{
    min-height:38px!important;
    height:38px!important;
    padding:0 12px!important;
  }

  .tw-package-chooser-scroll{
    overflow:visible!important;
    padding:12px 16px 16px!important;
  }

  .tw-package-choice-group h3{
    margin:0 0 6px!important;
    font-size:8px!important;
  }

  .tw-package-choice-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }

  .tw-package-choice{
    min-height:72px!important;
    padding:9px 10px 9px 12px!important;
    gap:8px!important;
    border-radius:13px!important;
  }

  .tw-package-choice-main strong{
    font-size:16px!important;
  }

  .tw-package-choice-main small{
    margin-top:3px!important;
    font-size:6.5px!important;
  }

  .tw-package-choice-price{
    gap:4px!important;
  }

  .tw-package-choice-price s{
    font-size:8px!important;
  }

  .tw-package-choice-price b{
    font-size:20px!important;
  }

  .tw-package-choice-price em{
    font-size:6px!important;
  }

  .tw-package-choice-check{
    width:20px!important;
    height:20px!important;
    font-size:12px!important;
  }
}

/* Tablet: also remove section-height inheritance and keep both rows close. */
@media(max-width:900px) and (min-width:621px){
  .tw-package-chooser-shell{
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 28px)!important;
    grid-template-rows:auto auto!important;
  }

  .tw-package-chooser-scroll{
    height:auto!important;
    overflow:auto!important;
    padding:12px!important;
  }

  .tw-package-chooser-shell .tw-package-choice-group + .tw-package-choice-group{
    margin-top:10px!important;
  }

  .tw-package-choice{
    min-height:74px!important;
  }
}
