/* Lamari Diarios · responsive hardening global v1.40.379
 * Objetivo: que el frontal no pierda controles ni genere recortes al pasar de
 * escritorio ancho a portátil (1920 / 1600 / 1440 / 1366 y escalado habitual).
 */

/* 1) Todos los contenedores principales del plugin deben poder encogerse. */
:where(
  .kd-advertising-template-main,.kd-bar-template-main,.kd-blog-single-template-main,
  .kd-blog-template-main,.kd-breeders-template-main,.kd-companies-template-main,
  .kd-company-template-main,.kd-compliance-template-main,.kd-contact-template-main,
  .kd-contests-template-main,.kd-create-diary-template-main,.kd-diary-template-main,
  .kd-directory-template-main,.kd-equipment-template-main,.kd-explore-template-main,.kd-bancoteca-template-main,
  .kd-faq-template-main,.kd-feed-template-main,.kd-growers-template-main,
  .kd-growshops-template-main,.kd-my-diaries-template-main,.kd-nutrients-template-main,
  .kd-privacy-template-main,.kd-question-template-main,.kd-questions-template-main,
  .kd-seeds-template-main,.kd-shorts-template-main,.kd-strains-template-main,
  .kd-terms-template-main,.kd-business-panel-main
) {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}

:where(
  .kd-advertising-template-main,.kd-bar-template-main,.kd-blog-single-template-main,
  .kd-blog-template-main,.kd-breeders-template-main,.kd-companies-template-main,
  .kd-company-template-main,.kd-compliance-template-main,.kd-contact-template-main,
  .kd-contests-template-main,.kd-create-diary-template-main,.kd-diary-template-main,
  .kd-directory-template-main,.kd-equipment-template-main,.kd-explore-template-main,.kd-bancoteca-template-main,
  .kd-faq-template-main,.kd-feed-template-main,.kd-growers-template-main,
  .kd-growshops-template-main,.kd-my-diaries-template-main,.kd-nutrients-template-main,
  .kd-privacy-template-main,.kd-question-template-main,.kd-questions-template-main,
  .kd-seeds-template-main,.kd-shorts-template-main,.kd-strains-template-main,
  .kd-terms-template-main,.kd-business-panel-main
) :where(
  .kd-strains-app,[class*="kd-"][class*="-shell"],[class*="kd-"][class*="-content"],
  [class*="kd-"][class*="-directory"],[class*="kd-"][class*="-grid"],
  [class*="kd-"][class*="-panel"],[class*="kd-"][class*="-card"]
) {
  box-sizing:border-box!important;
  max-width:100%!important;
  min-width:0!important;
}

/* El contenido multimedia nunca debe ensanchar su contenedor. */
:where(
  .kd-advertising-template-main,.kd-bar-template-main,.kd-blog-single-template-main,
  .kd-blog-template-main,.kd-breeders-template-main,.kd-companies-template-main,
  .kd-company-template-main,.kd-compliance-template-main,.kd-contact-template-main,
  .kd-contests-template-main,.kd-create-diary-template-main,.kd-diary-template-main,
  .kd-directory-template-main,.kd-equipment-template-main,.kd-explore-template-main,.kd-bancoteca-template-main,
  .kd-faq-template-main,.kd-feed-template-main,.kd-growers-template-main,
  .kd-growshops-template-main,.kd-my-diaries-template-main,.kd-nutrients-template-main,
  .kd-privacy-template-main,.kd-question-template-main,.kd-questions-template-main,
  .kd-seeds-template-main,.kd-shorts-template-main,.kd-strains-template-main,
  .kd-terms-template-main,.kd-business-panel-main
) :where(img,video,iframe,canvas) {
  max-width:100%!important;
}

/* 2) El fallo visible de Cepas: nunca ocultar filtros en un carril horizontal. */
body.kd-strains-page .kd-strain-filter-form,
body.kd-standalone-strains-template .kd-strain-filter-form {
  flex-wrap:wrap!important;
  overflow-x:visible!important;
  scrollbar-width:auto!important;
}
body.kd-strains-page .kd-strain-search,
body.kd-standalone-strains-template .kd-strain-search {
  min-width:170px!important;
  flex:1 1 190px!important;
  width:auto!important;
  max-width:280px!important;
}
body.kd-strains-page .kd-strain-select,
body.kd-standalone-strains-template .kd-strain-select {
  min-width:92px!important;
  flex:1 1 104px!important;
  max-width:145px!important;
}
body.kd-strains-page .kd-strain-select select,
body.kd-standalone-strains-template .kd-strain-select select {
  width:100%!important;
  max-width:100%!important;
}
body.kd-strains-page .kd-strain-filter-form > .kd-strain-apply,
body.kd-standalone-strains-template .kd-strain-filter-form > .kd-strain-apply,
body.kd-strains-page .kd-strain-filter-form > .kd-strain-clear,
body.kd-standalone-strains-template .kd-strain-filter-form > .kd-strain-clear {
  flex:0 0 auto!important;
}

/* 3) Escritorio medio / portátil: barras de herramientas pueden saltar de línea
 * en lugar de perder acciones fuera del viewport. Se excluye la topbar global. */
@media (max-width:1700px) {
  :where(
    .kd-advertising-template-main,.kd-bar-template-main,.kd-blog-single-template-main,
    .kd-blog-template-main,.kd-breeders-template-main,.kd-companies-template-main,
    .kd-company-template-main,.kd-compliance-template-main,.kd-contact-template-main,
    .kd-contests-template-main,.kd-create-diary-template-main,.kd-diary-template-main,
    .kd-directory-template-main,.kd-equipment-template-main,.kd-explore-template-main,.kd-bancoteca-template-main,
    .kd-faq-template-main,.kd-feed-template-main,.kd-growers-template-main,
    .kd-growshops-template-main,.kd-my-diaries-template-main,.kd-nutrients-template-main,
    .kd-privacy-template-main,.kd-question-template-main,.kd-questions-template-main,
    .kd-seeds-template-main,.kd-shorts-template-main,.kd-strains-template-main,
    .kd-terms-template-main,.kd-business-panel-main
  ) :where(
    [class*="kd-"][class*="-toolbar"],
    [class*="kd-"][class*="-filters"],
    [class*="kd-"][class*="-filterbar"],
    [class*="kd-"][class*="-tools"],
    [class*="kd-"][class*="-actions"],
    [class*="kd-"][class*="-heading"]
  ) {
    min-width:0!important;
    max-width:100%!important;
    flex-wrap:wrap!important;
  }

  :where(
    .kd-advertising-template-main,.kd-bar-template-main,.kd-blog-single-template-main,
    .kd-blog-template-main,.kd-breeders-template-main,.kd-companies-template-main,
    .kd-company-template-main,.kd-compliance-template-main,.kd-contact-template-main,
    .kd-contests-template-main,.kd-create-diary-template-main,.kd-diary-template-main,
    .kd-directory-template-main,.kd-equipment-template-main,.kd-explore-template-main,.kd-bancoteca-template-main,
    .kd-faq-template-main,.kd-feed-template-main,.kd-growers-template-main,
    .kd-growshops-template-main,.kd-my-diaries-template-main,.kd-nutrients-template-main,
    .kd-privacy-template-main,.kd-question-template-main,.kd-questions-template-main,
    .kd-seeds-template-main,.kd-shorts-template-main,.kd-strains-template-main,
    .kd-terms-template-main,.kd-business-panel-main
  ) :where(input,select,textarea,button) {
    box-sizing:border-box!important;
    max-width:100%;
    min-width:0;
  }
}

/* 4) A 1440/1366 px el ancho útil suele ser menor por sidebar + escalado del SO. */
@media (max-width:1500px) {
  body.kd-strains-page .kd-strain-search,
  body.kd-standalone-strains-template .kd-strain-search {
    max-width:none!important;
  }

  :where(.kd-equipment-heading,.kd-growers-heading,.kd-breeders-heading,.kd-companies-toolbar) {
    align-items:flex-start!important;
    flex-wrap:wrap!important;
  }
  :where(.kd-equipment-tools,.kd-growers-tools,.kd-breeders-tools,.kd-companies-filters) {
    min-width:0!important;
    max-width:100%!important;
    flex:1 1 auto!important;
    flex-wrap:wrap!important;
  }
  :where(.kd-equipment-search,.kd-growers-search,.kd-breeders-search,.kd-companies-search) {
    min-width:180px!important;
    max-width:100%!important;
    flex:1 1 220px!important;
    width:auto!important;
  }
}

/* 5) En tablets/móviles: controles importantes ocupan una anchura utilizable. */
@media (max-width:760px) {
  body.kd-strains-page .kd-strain-search,
  body.kd-standalone-strains-template .kd-strain-search,
  body.kd-strains-page .kd-strain-select,
  body.kd-standalone-strains-template .kd-strain-select {
    max-width:none!important;
  }
  body.kd-strains-page .kd-strain-select,
  body.kd-standalone-strains-template .kd-strain-select {
    flex:1 1 calc(50% - 6px)!important;
  }
  body.kd-strains-page .kd-strain-filter-form > .kd-strain-apply,
  body.kd-standalone-strains-template .kd-strain-filter-form > .kd-strain-apply,
  body.kd-strains-page .kd-strain-filter-form > .kd-strain-clear,
  body.kd-standalone-strains-template .kd-strain-filter-form > .kd-strain-clear {
    min-height:40px!important;
  }
}
