/* PRECISE SHORTCUT LAYOUT */

#shortcutList.links{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr)) !important;
  gap:22px !important;
}

#shortcutList.links > a.card.shortcut-card{
  position:relative !important;
  display:block !important;

  min-height:120px !important;
  height:auto !important;
  box-sizing:border-box !important;
  padding:0 !important;
  overflow:hidden !important;

  border-radius:18px !important;
  background:var(--card) !important;
  border:1px solid var(--border) !important;
  box-shadow:0 8px 20px rgba(0,0,0,.04) !important;

  text-decoration:none !important;
  color:var(--text) !important;
  transition:.2s !important;
}

#shortcutList.links > a.card.shortcut-card:hover{
  transform:translateY(-4px) !important;
  box-shadow:0 14px 30px rgba(0,0,0,.08) !important;
  border-color:var(--accent) !important;
  text-decoration:none !important;
}

#shortcutList.links > a.card.shortcut-card::before,
#shortcutList.links > a.card.shortcut-card::after{
  content:none !important;
  display:none !important;
}

/* Значок: x=23, y=40-(40/2)=20 */
#shortcutList.links > a.card.shortcut-card > img.icon{
  position:absolute !important;
  left:23px !important;
  top:20px !important;

  width:40px !important;
  min-width:40px !important;
  max-width:40px !important;

  height:40px !important;
  min-height:40px !important;
  max-height:40px !important;

  display:block !important;
  object-fit:contain !important;
  margin:0 !important;
  padding:0 !important;
}

/* Общий стиль названия */
#shortcutList.links > a.card.shortcut-card > .card-title{
  position:absolute !important;
  top:40px !important;
  transform:translateY(-50%) !important;

  box-sizing:border-box !important;
  margin:0 !important;
  padding:0 !important;

  font-size:17px !important;
  font-weight:600 !important;
  line-height:1.18 !important;

  color:var(--text) !important;
  text-decoration:none !important;

  white-space:normal !important;
  overflow:hidden !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;

  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  max-height:2.36em !important;
}

/* Название со значком: x=23+40+16=79 */
#shortcutList.links > a.card.shortcut-card.has-icon > .card-title{
  left:79px !important;
  right:23px !important;
  text-align:left !important;
}

/* Название без значка: центр относительно всей рамки */
#shortcutList.links > a.card.shortcut-card.no-icon > .card-title{
  left:0 !important;
  right:0 !important;
  padding:0 23px !important;
  text-align:center !important;
}

/* Описание: x=по центру относительно всей рамки, y=75 */
#shortcutList.links > a.card.shortcut-card > .card-desc{
  position:absolute !important;
  top:75px !important;
  left:0 !important;
  right:0 !important;

  box-sizing:border-box !important;
  width:100% !important;

  margin:0 !important;
  padding:0 23px !important;

  font-size:12px !important;
  font-weight:400 !important;
  line-height:1.18 !important;

  color:var(--muted) !important;
  text-align:center !important;
  text-decoration:none !important;

  white-space:normal !important;
  overflow:hidden !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;

  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  max-height:2.36em !important;
}

/* FINAL FIX: title y = 40 - real_title_height / 2 */
#shortcutList.links > a.card.shortcut-card > .card-title{
  position:absolute !important;
  top:40px !important;
  transform:translateY(-50%) !important;

  height:auto !important;
  min-height:0 !important;
  max-height:2.36em !important;

  margin:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;

  line-height:1.18 !important;

  display:block !important;
  overflow:hidden !important;

  white-space:normal !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;
}

/* Со значком: x = 23 + 40 + 16 = 79 */
#shortcutList.links > a.card.shortcut-card.has-icon > .card-title{
  left:79px !important;
  right:23px !important;
  text-align:left !important;
}

/* Без значка: x = по центру относительно всей рамки */
#shortcutList.links > a.card.shortcut-card.no-icon > .card-title{
  left:0 !important;
  right:0 !important;
  padding-left:23px !important;
  padding-right:23px !important;
  text-align:center !important;
}

/* FINAL FIX: title without icon starts at x=23 */
#shortcutList.links > a.card.shortcut-card.no-icon > .card-title{
  left:23px !important;
  right:23px !important;
  padding-left:0 !important;
  padding-right:0 !important;
  text-align:left !important;

  top:40px !important;
  transform:translateY(-50%) !important;

  height:auto !important;
  min-height:0 !important;
  max-height:2.36em !important;
}
