/* ПитомЧик v79.2.8 — точечная полировка кабинета и страницы вопроса на ПК.
   Мобильная версия, серверная логика, Метрика и SEO не затрагиваются. */

/* Фотография пользователя должна открываться поверх окна его профиля. */
#photo-lightbox.photo-lightbox{
  z-index:36000!important;
}

@media (min-width:1001px){
  /* Главная кабинета: компактная фирменная кнопка рядом с «Мои питомцы». */
  [data-panel="overview"] .account-card-header [data-open-pet-modal]{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:8px 14px!important;
    border:1px solid rgba(47,109,70,.22)!important;
    border-radius:999px!important;
    background:linear-gradient(180deg,#f4faf3,#e7f3e8)!important;
    color:#245d38!important;
    font-size:.82rem!important;
    font-weight:850!important;
    line-height:1!important;
    white-space:nowrap!important;
    box-shadow:0 7px 18px rgba(35,92,53,.10)!important;
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease!important;
  }
  [data-panel="overview"] .account-card-header [data-open-pet-modal]:hover{
    transform:translateY(-1px)!important;
    background:#fff!important;
    box-shadow:0 10px 22px rgba(35,92,53,.14)!important;
  }

  /* Заголовки разделов: кнопки не сжимаются и не переносятся на две строки. */
  .pets-title,
  .favorites-title{
    align-items:center!important;
  }
  .pets-title > .button,
  .favorites-title > .button{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    min-height:50px!important;
    padding:12px 20px!important;
    border-radius:17px!important;
    white-space:nowrap!important;
    line-height:1.1!important;
    box-shadow:0 10px 24px rgba(35,92,53,.16)!important;
  }
  .pets-title > .button{min-width:190px!important;}
  .favorites-title > .button{min-width:210px!important;}

  /* Карточкам питомцев и любимчиков даём нормальную ширину вместо узких колонок. */
  .pet-cards-grid,
  .favorite-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:18px!important;
  }
  .favorite-grid > .empty-account{
    grid-column:1/-1!important;
  }

  /* Карточка питомца: основное действие сверху, редактирование и удаление рядом. */
  .pet-card-v71{
    border-radius:24px!important;
    box-shadow:0 16px 36px rgba(35,66,44,.09)!important;
  }
  .pet-edit-icon{
    border:1px solid #c9ddcd!important;
    background:#edf6ee!important;
    box-shadow:0 5px 12px rgba(30,86,49,.08)!important;
  }
  .pet-card-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    padding-top:18px!important;
  }
  .pet-card-actions .button,
  .pet-delete-button{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:44px!important;
    padding:9px 12px!important;
    border-radius:14px!important;
    box-sizing:border-box!important;
    line-height:1.2!important;
    text-align:center!important;
  }
  .pet-card-actions > a.button:first-child{
    grid-column:1/-1!important;
    min-height:47px!important;
    white-space:nowrap!important;
  }
  .pet-delete-button{
    grid-column:auto!important;
    border:1px solid #ebc6c1!important;
    background:#fff4f2!important;
    color:#9c3d38!important;
    cursor:pointer!important;
    font-weight:800!important;
  }
  .pet-delete-button:hover{
    background:#fbe8e5!important;
    border-color:#dfa9a2!important;
  }

  /* Карточка любимчика: одинаковые аккуратные кнопки и инструменты. */
  .favorite-card{
    border-radius:24px!important;
    box-shadow:0 16px 36px rgba(35,66,44,.09)!important;
  }
  .favorite-card-actions{
    gap:10px!important;
    padding-top:3px!important;
  }
  .favorite-card-actions .button{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:45px!important;
    padding:9px 12px!important;
    border-radius:14px!important;
    line-height:1.15!important;
    text-align:center!important;
  }
  .favorite-card-tools{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding-top:2px!important;
  }
  .favorite-card-tools button{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    min-height:40px!important;
    padding:8px 9px!important;
    border:1px solid #d6e3d7!important;
    border-radius:12px!important;
    background:#f4f8f3!important;
    color:#326147!important;
    font-size:.76rem!important;
    font-weight:800!important;
    line-height:1.2!important;
    text-align:center!important;
    cursor:pointer!important;
  }
  .favorite-card-tools button:hover{
    background:#e9f3e9!important;
    border-color:#bdd4c0!important;
  }
  .favorite-card-remove{
    transition:transform .18s ease,background .18s ease!important;
  }
  .favorite-card-remove:hover{
    transform:scale(1.06)!important;
    background:#fff1ef!important;
  }

  /* Профиль: крупные заголовки нижних карточек больше не съезжают. */
  .account-blocked-users-card,
  .account-staff-card{
    min-width:0!important;
    align-self:start!important;
    overflow:hidden!important;
  }
  .account-blocked-users-card h2,
  .account-staff-card h2{
    max-width:100%!important;
    margin:3px 0 10px!important;
    font-size:clamp(1.55rem,2.15vw,2rem)!important;
    line-height:1.12!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }
  .account-staff-card .eyebrow{
    margin-bottom:7px!important;
  }
  .account-staff-card > p{
    margin-top:0!important;
    line-height:1.45!important;
  }
  .account-staff-permissions{
    gap:7px!important;
    margin:12px 0 14px!important;
  }
  .account-staff-permissions span{
    min-height:28px!important;
    padding:5px 9px!important;
    font-size:.7rem!important;
    line-height:1.15!important;
  }

  /* Страница «Задать вопрос»: убираем чрезмерную пустоту в верхнем блоке. */
  body.request-page .request-hero{
    padding:28px 0 24px!important;
  }
  body.request-page .request-hero-grid{
    align-items:start!important;
    gap:30px!important;
  }
  html[data-account-return="quick"] body.request-page .account-context-nav{
    margin-bottom:10px!important;
  }
  html[data-account-return="quick"] body.request-page .request-hero-grid > div:not(.account-context-nav){
    padding-top:8px!important;
  }
  body.request-page .request-side-card{
    min-height:310px!important;
    padding:26px 28px!important;
  }
  body.request-page .request-side-icon{
    margin-bottom:30px!important;
  }
  body.request-page .request-main{
    padding-top:22px!important;
  }
}

/* На более узком ПК заголовок и кнопка могут встать друг под другом без сжатия. */
@media (min-width:1001px) and (max-width:1180px){
  .pets-title,
  .favorites-title{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    justify-items:start!important;
    gap:14px!important;
  }
  .pets-title > .button,
  .favorites-title > .button{
    min-width:0!important;
  }
}
