
/* UI-r46 — mobile/tablet smoke guards after icon unification.
   Scope: visual safety only. No route/API/business logic changes. */

:root{
  --kr-ui-icon-size: 22px;
  --kr-ui-icon-box: 42px;
  --kr-ui-icon-color: #ff6a00;
  --kr-ui-icon-bg: rgba(255,106,0,.08);
  --kr-ui-icon-border: rgba(255,106,0,.14);
}

/* Universal text/icon overlap guard for button-like and card-like controls. */
button,
.btn,
.flow-btn,
.catalog-tool-btn,
.mo-search-submit,
.mo-search-toggle,
.services-app-btn,
.services-app-card,
.services-app-item,
.services-app-option,
.services-app-sheet button,
.services-app-sheet__option,
.cabinet-card,
.client-cabinet-card,
.master-cabinet-card,
.sto-card{
  min-width:0;
  max-width:100%;
}

button > span,
.btn > span,
.flow-btn > span,
.catalog-tool-btn > span,
.mo-search-submit > span,
.mo-search-toggle > span,
.services-app-btn > span,
.services-app-card > span,
.services-app-item > span,
.services-app-option > span,
.client-cabinet-card > span,
.master-cabinet-card > span,
.sto-card > span{
  min-width:0;
}

button b,
button strong,
button small,
.btn b,
.btn strong,
.btn small,
.catalog-tool-btn b,
.mo-search-submit b,
.mo-search-toggle b,
.services-app-btn b,
.services-app-btn strong,
.services-app-card b,
.services-app-card strong,
.services-app-card small,
.services-app-item b,
.services-app-item strong,
.services-app-item small,
.services-app-option b,
.services-app-option strong,
.services-app-option small,
.client-cabinet-card b,
.client-cabinet-card strong,
.client-cabinet-card small,
.master-cabinet-card b,
.master-cabinet-card strong,
.master-cabinet-card small,
.sto-card b,
.sto-card strong,
.sto-card small{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:normal;
  white-space:normal;
}

/* Icon boxes: keep first-screen orange line style and stop emoji/color icons from dominating. */
[class*="ico"],
[class*="icon"],
.services-app-ico,
.services-app-icon,
.cabinet-icon,
.client-cabinet-icon,
.master-cabinet-icon,
.sto-icon,
.mo-search-ico,
.catalog-tool-btn__ico{
  flex:0 0 auto;
  line-height:1;
}

.services-app-ico,
.services-app-icon,
.cabinet-icon,
.client-cabinet-icon,
.master-cabinet-icon,
.sto-icon,
.catalog-tool-btn__ico{
  width:var(--kr-ui-icon-box);
  height:var(--kr-ui-icon-box);
  min-width:var(--kr-ui-icon-box);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  color:var(--kr-ui-icon-color);
  background:var(--kr-ui-icon-bg);
  border:1px solid var(--kr-ui-icon-border);
  font-size:var(--kr-ui-icon-size);
  overflow:hidden;
}

/* Prevent inline SVG helpers from stretching or shifting text baselines. */
.kr-line-icon,
.ui-line-icon,
[data-ui-icon] svg,
button svg,
.btn svg,
.services-app-btn svg,
.services-app-card svg,
.catalog-tool-btn svg{
  width:1.15em;
  height:1.15em;
  min-width:1.15em;
  display:inline-block;
  vertical-align:-.18em;
  color:currentColor;
  stroke:currentColor;
}

/* Mobile smoke guards. */
@media (max-width:767px){
  button,
  .btn,
  .flow-btn,
  .services-app-btn,
  .catalog-tool-btn,
  .mo-search-submit,
  .mo-search-toggle{
    gap:8px;
    align-items:center;
    justify-content:center;
    line-height:1.18;
  }

  .services-app-card,
  .services-app-item,
  .services-app-option,
  .client-cabinet-card,
  .master-cabinet-card,
  .sto-card{
    min-height:auto;
    height:auto;
    align-items:flex-start;
  }

  .services-app-ico,
  .services-app-icon,
  .cabinet-icon,
  .client-cabinet-icon,
  .master-cabinet-icon,
  .sto-icon,
  .catalog-tool-btn__ico{
    width:38px;
    height:38px;
    min-width:38px;
    border-radius:13px;
    font-size:20px;
  }
}

/* Tablet smoke guards. */
@media (min-width:768px){
  .services-app-card,
  .services-app-item,
  .services-app-option,
  .client-cabinet-card,
  .master-cabinet-card,
  .sto-card{
    min-height:auto;
    height:auto;
    align-items:stretch;
  }

  .services-app-card,
  .services-app-item,
  .services-app-option{
    gap:14px;
  }

  .services-app-ico,
  .services-app-icon,
  .cabinet-icon,
  .client-cabinet-icon,
  .master-cabinet-icon,
  .sto-icon,
  .catalog-tool-btn__ico{
    width:46px;
    height:46px;
    min-width:46px;
    border-radius:15px;
  }

  .catalog-tool-btn,
  .mo-search-submit,
  .mo-search-toggle{
    min-height:48px;
  }
}

/* Wide/tablet landscape: keep icon/text from stretching across large grid cells. */
@media (min-width:1024px){
  .services-app-card,
  .services-app-item,
  .services-app-option,
  .client-cabinet-card,
  .master-cabinet-card,
  .sto-card{
    container-type:inline-size;
  }

  .services-app-card > *,
  .services-app-item > *,
  .services-app-option > *,
  .client-cabinet-card > *,
  .master-cabinet-card > *,
  .sto-card > *{
    max-width:100%;
  }

  .services-app-ico,
  .services-app-icon,
  .cabinet-icon,
  .client-cabinet-icon,
  .master-cabinet-icon,
  .sto-icon{
    width:50px;
    height:50px;
    min-width:50px;
  }
}

/* Low-height tablet landscape. */
@media (min-width:768px) and (max-height:760px){
  .services-app-card,
  .services-app-item,
  .services-app-option,
  .client-cabinet-card,
  .master-cabinet-card,
  .sto-card{
    padding-top:12px;
    padding-bottom:12px;
  }

  .services-app-ico,
  .services-app-icon,
  .cabinet-icon,
  .client-cabinet-icon,
  .master-cabinet-icon,
  .sto-icon{
    width:40px;
    height:40px;
    min-width:40px;
  }
}
