/* =====================================================================
 * POLISH-THREAD 28.09.2026 (threads-ui-thread): тред, коментарі, форма
 * створення, профіль улюбленця, вікно входу. Поліпшення на місці, без
 * зміни шелу/навігації. Підключається лише коли amg_comm_polish_thread=1
 * (реєстрація в amigo-community.php); клас body.amg-comm-pt той самий кілсвіч.
 * Токени ті самі, що в POLISH-FEED (community.css), оголошені тут ще раз,
 * щоб файл не залежав від amg_comm_polish_feed.
 * ===================================================================== */
body.amg-comm-pt{
  --ink:#190a03;--amber-signal:#ffba00;
  --state:#1c49c2;--state-deep:#143795;--state-wash:#f0f6fc;--state-ring:#d9e6f4;
  --panel:#f5f5f5;--panel-line:#ebebeb;--pt-muted:#6b6560;--pt-crit:#cf1124;
}

/* ---------- №17: одна стрілка з підписом «У стрічку» ---------- */
body.amg-comm-pt .amg-comm .amg-comm-back-minimal--label,
body.amg-comm-pt .amg-comm-back-btn--label{
  width:auto;height:44px;min-height:44px;padding:0 14px 0 8px;margin:0 0 4px -8px;
  display:inline-flex;align-items:center;gap:6px;border-radius:22px;
  color:var(--ink);font-size:15px;font-weight:600;line-height:1;text-decoration:none;white-space:nowrap
}
body.amg-comm-pt .amg-comm .amg-comm-back-minimal--label svg,
body.amg-comm-pt .amg-comm-back-btn--label svg{width:22px;height:22px;flex:0 0 auto}
body.amg-comm-pt .amg-comm .amg-comm-back-minimal--label:hover,
body.amg-comm-pt .amg-comm-back-btn--label:hover{background:var(--panel)}
body.amg-comm-pt .amg-comm .amg-comm-back-minimal--label:focus-visible,
body.amg-comm-pt .amg-comm-back-btn--label:focus-visible{outline:2px solid var(--state);outline-offset:2px}

/* ---------- №14: типографіка треду ---------- */
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt h1.amg-comm-title-text{
  font-size:20px;font-weight:700;line-height:1.3;color:var(--ink);margin:12px 0 8px;letter-spacing:0
}
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-content{font-size:16px;line-height:1.5;color:var(--ink)}
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-name{font-size:15px;font-weight:600}

/* ---------- №24: бейдж довіри «AmigoVet» тихою пігулкою ---------- */
body.amg-comm-pt .amg-comm .amg-comm-official--pill,
body.amg-comm-pt .amg-comm .amg-comm-official-badge--pill{
  display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;
  background:var(--panel);border:1px solid var(--panel-line);color:var(--ink);
  font-size:12px;font-weight:700;line-height:1;vertical-align:middle;box-shadow:none
}

/* ---------- №15: дії треду, тач-ціль 44 px ---------- */
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-actions-bar{gap:0;margin:8px 0 4px -12px;padding:0}
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-action-btn{
  min-height:44px;min-width:44px;padding:0 12px;justify-content:center;color:var(--ink);font-size:15px;font-weight:600
}
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-action-btn svg,
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-react-icon svg{width:24px;height:24px;min-width:24px;flex:0 0 24px}
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-actions-bar .amg-comm-action-btn{width:auto;flex:0 0 auto}
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-action-btn.is-liked{color:#cf1124}
body.amg-comm-pt .amg-comm .amg-comm-thread-single--pt .amg-comm-meta-line{font-size:13px;color:var(--pt-muted)}

/* ---------- №14, №15: коментарі ---------- */
body.amg-comm-pt .amg-comm .amg-comm-comment-text{font-size:16px;line-height:1.5;color:var(--ink)}
body.amg-comm-pt .amg-comm .amg-comm-comment-head .amg-comm-name{font-size:15px;font-weight:600;color:var(--ink)}
body.amg-comm-pt .amg-comm .amg-comm-comment-head .amg-comm-meta{font-size:13px;color:var(--pt-muted)}
body.amg-comm-pt .amg-comm .amg-comm-c-actions{display:flex;align-items:center;gap:4px;margin:2px 0 0 -12px}
body.amg-comm-pt .amg-comm .amg-comm-c-like,
body.amg-comm-pt .amg-comm .amg-comm-c-reply{
  display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;padding:0 12px;
  font-size:14px;font-weight:600;color:var(--pt-muted);border-radius:22px;line-height:1
}
body.amg-comm-pt .amg-comm .amg-comm-c-like svg{width:18px;height:18px}
body.amg-comm-pt .amg-comm .amg-comm-c-like:hover,
body.amg-comm-pt .amg-comm .amg-comm-c-reply:hover{background:var(--panel);color:var(--ink)}
body.amg-comm-pt .amg-comm .amg-comm-c-like.is-liked{color:#cf1124}
body.amg-comm-pt .amg-comm .amg-comm-comment-trigger{min-height:48px}
body.amg-comm-pt .amg-comm .amg-comm-comment-trigger__input{font-size:16px}

/* ---------- «Більше публікацій», підписи без капсу (№19) ---------- */
body.amg-comm-pt .amg-comm .amg-comm-more-title,
body.amg-comm-pt .amg-comm .amg-comm-products-label,
body.amg-comm-pt .amg-comm .amg-comm-adopt-title,
body.amg-comm-pt .amg-comm .amg-comm-label,
body.amg-comm-pt .amg-comm-petselect .amg-comm-title{
  text-transform:none;letter-spacing:0;font-size:15px;font-weight:700;color:var(--ink)
}
body.amg-comm-pt .amg-comm .amg-comm-more-title{font-size:17px}

/* ---------- №20: картки товарів магазину у треді ---------- */
body.amg-comm-pt .amg-comm .amg-comm-products--shop{margin:16px 0 8px}
body.amg-comm-pt .amg-comm .amg-comm-products--shop .amg-comm-products-label{margin:0 0 10px}
body.amg-comm-pt .amg-comm .amg-comm-products--shop .amgv-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;padding:0
}
@media (min-width:768px){
  body.amg-comm-pt .amg-comm .amg-comm-products--shop .amgv-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* «Не підходить» живе лише в каталозі: у треді без стилів amg-nofit показувався сірий квадрат */
body.amg-comm-pt .amg-comm .amg-comm-products--shop .amgnf-btn{display:none!important}

/* ---------- №19: форма створення ---------- */
body.amg-comm-pt .amg-comm fieldset.amg-comm-petselect,
body.amg-comm-pt .amg-comm fieldset{border:0;padding:0;margin-left:0;margin-right:0;min-width:0}
body.amg-comm-pt .amg-comm legend.amg-comm-label{padding:0;margin-bottom:8px}
body.amg-comm-pt .amg-comm .amg-comm-form-fact{
  margin:4px 0 12px;font-size:14px;line-height:1.4;color:var(--pt-muted)
}
body.amg-comm-pt .amg-comm-field-error{
  margin:6px 0 0;font-size:14px;line-height:1.35;color:var(--pt-crit);font-weight:600
}
body.amg-comm-pt .amg-comm .amg-comm-input-error{border-color:var(--pt-crit)!important}
body.amg-comm-pt .amg-comm .amg-comm-col-form textarea,
body.amg-comm-pt .amg-comm .amg-comm-col-form input[type=text],
body.amg-comm-pt .amg-comm textarea.amg-comm-input,
body.amg-comm-pt .amg-comm input.amg-comm-input{font-family:inherit;font-size:16px}
body.amg-comm-pt .amg-comm .amg-comm-open-products{
  min-height:44px;padding:0 16px;border-radius:12px;border:1px solid var(--panel-line);
  background:#fff;color:var(--ink);font-size:15px;font-weight:600
}

/* Вікно «Додати товар»: «З моїх замовлень» */
body.amg-comm-pt .amg-comm .amg-comm-orders{margin:12px 0 4px}
body.amg-comm-pt .amg-comm .amg-comm-orders__title{font-size:15px;font-weight:700;color:var(--ink);margin:0 0 8px}
body.amg-comm-pt .amg-comm .amg-comm-orders-list{display:flex;flex-direction:column;gap:4px}
body.amg-comm-pt .amg-comm .amg-comm-orders-list .amg-comm-prod{
  display:flex;align-items:center;gap:10px;min-height:48px;padding:4px 8px;border-radius:10px;cursor:pointer
}
body.amg-comm-pt .amg-comm .amg-comm-orders-list .amg-comm-prod:hover{background:var(--panel)}
body.amg-comm-pt .amg-comm .amg-comm-orders-list .amg-comm-prod img{width:40px;height:40px;object-fit:contain;border-radius:8px;background:#fff;border:1px solid var(--panel-line)}
body.amg-comm-pt .amg-comm .amg-comm-orders-list .amg-comm-prod span{font-size:14px;line-height:1.3;color:var(--ink)}
body.amg-comm-pt .amg-comm .amg-comm-orders-list input[type=checkbox]{width:20px;height:20px;accent-color:var(--state);flex:0 0 auto}

/* ---------- №5: плашка «На перевірці» ---------- */
body.amg-comm-pt .amg-comm-pending-note{
  margin:8px 16px 12px;padding:12px 14px;border-radius:12px;
  background:var(--panel);border:1px solid var(--panel-line);color:var(--ink)
}
body.amg-comm-pt .amg-comm-pending-note__text{font-size:14px;line-height:1.4}
body.amg-comm-pt .amg-comm-pending-note__title{margin-top:4px;font-size:15px;font-weight:700;line-height:1.3}
body.amg-comm-pt .amg-comm-pending-note__title::before{content:"На перевірці: ";font-weight:600;color:var(--pt-muted)}
@media (min-width:768px){body.amg-comm-pt .amg-comm-pending-note{margin:8px 0 12px}}

/* ---------- №29: панель входу (вікно, форма гостя, адопція) ---------- */
body.amg-comm-pt .amg-comm-gate{
  text-align:left;padding:20px;border-radius:16px;background:#fff;border:1px solid var(--panel-line);color:var(--ink)
}
body.amg-comm-pt .amg-comm-gate__title{font-size:18px;font-weight:700;line-height:1.3;color:var(--ink);margin:0 0 6px}
body.amg-comm-pt .amg-comm-gate__text{font-size:15px;line-height:1.45;color:var(--pt-muted);margin:0 0 16px}
body.amg-comm-pt .amg-comm-gate__row{display:flex;gap:8px;flex-wrap:wrap}
body.amg-comm-pt .amg-comm-gate__btn{
  display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 24px;
  border-radius:12px;background:var(--amber-signal);color:var(--ink);font-size:16px;font-weight:700;
  text-decoration:none!important;border:0;flex:1 1 140px
}
body.amg-comm-pt .amg-comm .amg-comm-gate a.amg-comm-gate__btn,
body.amg-comm-pt .amg-comm-gate a.amg-comm-gate__btn:visited{color:var(--ink)}
body.amg-comm-pt .amg-comm-adopt-gate .amg-comm-gate__btn{flex:0 0 auto;min-width:160px}
body.amg-comm-pt .amg-comm-gate__btn:hover{background:#ffc832}
body.amg-comm-pt .amg-comm-gate__btn:active{background:#d99c00}
body.amg-comm-pt .amg-comm-gate__later{
  display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 20px;
  border-radius:12px;background:#fff;color:var(--ink);font-size:16px;font-weight:600;
  border:1px solid var(--panel-line);cursor:pointer;flex:1 1 120px;font-family:inherit
}
body.amg-comm-pt .amg-comm-gate__later:hover{background:var(--panel)}
body.amg-comm-pt .amg-comm-gate__btn:focus-visible,
body.amg-comm-pt .amg-comm-gate__later:focus-visible{outline:2px solid var(--state);outline-offset:2px}
body.amg-comm-pt .amg-comm-adopt-gate{margin:16px 0}

/* Вікно входу: нижня шторка на телефоні, центр на ПК */
body.amg-comm-pt #amg-comm-login-modal.amg-comm-login-pt{
  position:fixed;inset:0;z-index:100100;display:flex;align-items:flex-end;justify-content:center;
  background:rgba(25,10,3,.45);padding:0
}
body.amg-comm-pt .amg-comm-login-pt__panel{
  width:100%;max-width:480px;border-radius:20px 20px 0 0;border:0;
  padding:24px 20px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 -4px 24px rgba(25,10,3,.12)
}
@media (min-width:768px){
  body.amg-comm-pt #amg-comm-login-modal.amg-comm-login-pt{align-items:center;padding:16px}
  body.amg-comm-pt .amg-comm-login-pt__panel{max-width:400px;border-radius:20px;padding:24px}
}

/* ---------- №17, №27: профіль улюбленця ---------- */
body.amg-comm-pt .amg-comm-pet-profile__header--pt{display:flex;align-items:center;gap:8px;padding:4px 16px;min-height:52px}
body.amg-comm-pt .amg-comm-pet-profile__header--pt .amg-comm-back-btn--label{margin:0 0 0 -8px}
body.amg-comm-pt .amg-comm-pet-profile__screen{
  flex:1 1 auto;min-width:0;text-align:right;font-size:15px;font-weight:600;color:var(--pt-muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
body.amg-comm-pt .amg-comm-pet-profile__avatar--initial{
  display:flex;align-items:center;justify-content:center;background:var(--panel);border-color:var(--panel-line)
}
body.amg-comm-pt .amg-comm-pet-profile__avatar-placeholder--initial{
  font-size:40px;font-weight:700;color:var(--ink);line-height:1;background:transparent
}
body.amg-comm-pt .amg-comm-pet-profile__rank{
  display:flex;flex-direction:column;align-items:center;gap:6px;margin:10px auto 4px;max-width:320px;text-align:center
}
body.amg-comm-pt .amg-comm-pet-profile__rank-pill{
  display:inline-flex;align-items:center;height:26px;padding:0 12px;border-radius:999px;
  background:var(--panel);border:1px solid var(--panel-line);color:var(--ink);font-size:14px;font-weight:700
}
body.amg-comm-pt .amg-comm-pet-profile__rank-note{font-size:14px;line-height:1.4;color:var(--pt-muted)}
body.amg-comm-pt .amg-comm-pet-profile__info-label{color:var(--pt-muted);margin-right:4px}
body.amg-comm-pt .amg-comm-pet-friend__placeholder--initial{
  display:flex;align-items:center;justify-content:center;width:100%;height:100%;
  background:var(--panel);color:var(--ink);font-size:22px;font-weight:700;line-height:1
}

/* ---------- тред: стрілка у відступі сторінки (раніше прилипала до краю) ---------- */
body.amg-comm-pt .amg-comm .amg-comm-back-minimal--label{margin:4px 0 4px 8px}

/* ---------- сторінка створення: бічний відступ 16 px на телефоні (поля торкались краю) ---------- */
@media (max-width:767px){
  body.amg-comm-pt .amg-comm--compose #amg-comm-create{padding-left:16px;padding-right:16px;box-sizing:border-box}
}
