/* =========================================================
   AConfession Profile Friends CSS
   Path: public_html/assets/css/profile-friends.css
   Scope: friendship controls/lists/subtabs inside profile page.
   ========================================================= */

.acf-profile-pill.is-friend {
  border-color: rgba(34,197,94,.28);
  color: #bbf7d0;
  background: rgba(34,197,94,.09);
}
.acf-profile-friends-list {
  display: grid;
  gap: var(--friend-panel-gap, 14px);
}
.acf-profile-friends-group {
  display: grid;
  gap: 9px;
}
.acf-profile-friends-group h2 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}
.acf-profile-friends-group h2 span {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
  font-size: 11px;
}
.acf-profile-friend-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: var(--friend-card-radius, 20px);
  background: rgba(255,255,255,.040);
}
.acf-profile-friend-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}
.acf-profile-friend-main img {
  width: var(--friend-card-avatar-size, 42px);
  height: var(--friend-card-avatar-size, 42px);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
}
.acf-profile-friend-main span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.acf-profile-friend-main b {
  color: #fff;
  font-size: var(--me-card-meta-size, 12px);
  font-weight: 950;
  max-width: 170px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.acf-profile-friend-main small {
  color: #94a3b8;
  font-size: 11px;
}
.acf-profile-friend-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.acf-profile-friend-actions form { margin: 0; }
.acf-profile-friend-btn {
  width: var(--friend-action-size, 34px);
  height: var(--friend-action-size, 34px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.055);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}
.acf-profile-friend-btn.is-approve {
  color: #bbf7d0;
  border-color: rgba(34,197,94,.28);
  background: rgba(34,197,94,.10);
}
.acf-profile-friend-btn.is-danger {
  color: #fecaca;
  border-color: rgba(239,68,68,.28);
  background: rgba(239,68,68,.10);
}
.acf-profile-friend-svg {
  width: var(--friend-action-icon-size, 18px);
  height: var(--friend-action-icon-size, 18px);
  display: block;
}
@media (max-width: 420px) {
  .acf-profile-friend-main b { max-width: 126px; }
  .acf-profile-tabs button { padding-inline: 10px !important; }
}

.acf-profile-page .acf-profile-action-btn.is-friend-decision {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 16px;
  border-width: 1px;
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
}
.acf-profile-page .acf-profile-action-btn.is-friend-accept {
  color: #bbf7d0;
  border-color: rgba(34,197,94,.34);
  background: rgba(34,197,94,.12);
}
.acf-profile-page .acf-profile-action-btn.is-friend-reject {
  color: #fecaca;
  border-color: rgba(239,68,68,.34);
  background: rgba(239,68,68,.12);
}
.acf-profile-page .acf-profile-action-btn.is-friend-decision .acf-profile-action-svg {
  width: 21px;
  height: 21px;
}
.acf-profile-page .acf-profile-friend-btn.is-approve,
.acf-profile-page .acf-profile-friend-btn.is-danger {
  width: 36px;
  height: 36px;
  border-radius: 15px;
}
.acf-profile-page .acf-profile-friend-btn.is-approve .acf-profile-friend-svg,
.acf-profile-page .acf-profile-friend-btn.is-danger .acf-profile-friend-svg {
  width: 19px;
  height: 19px;
}

/* friend status row hotfix 2026-05-17 */
.acf-profile-page .acf-profile-actions.is-public-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.acf-profile-page .acf-profile-actions.is-public-actions::-webkit-scrollbar { display: none; }
.acf-profile-page .acf-profile-actions.is-public-actions .acf-profile-action-btn,
.acf-profile-page .acf-profile-actions.is-public-actions .acf-profile-pill {
  flex: 1 0 0;
  min-width: 64px;
  max-width: none;
  white-space: nowrap;
}
.acf-profile-page .acf-profile-actions.is-public-actions .acf-profile-inline-form {
  flex: 1 0 0;
  min-width: 64px;
  display: flex !important;
  margin: 0;
}
.acf-profile-page .acf-profile-actions.is-public-actions .acf-profile-inline-form .acf-profile-action-btn {
  flex: 1 1 auto;
  width: 100%;
}
.acf-profile-page .acf-profile-action-btn.is-friend-status-action.is-friend {
  border-color: rgba(34,197,94,.30);
  background: rgba(34,197,94,.10);
  color: #bbf7d0;
}
.acf-profile-page .acf-profile-action-btn.is-friend-status-action.is-pending,
.acf-profile-page .acf-profile-action-btn.is-friend-status-action.is-incoming {
  opacity: .92;
  cursor: default;
  border-color: rgba(251,191,36,.28);
  background: rgba(251,191,36,.09);
  color: #fde68a;
}
.acf-profile-friend-decision-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.acf-profile-friend-decision-text {
  min-width: 0;
  flex: 1 1 auto;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acf-profile-friend-decision-row .acf-profile-inline-form {
  display: inline-flex !important;
  flex: 0 0 auto;
  margin: 0;
}
.acf-profile-friend-decision-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  color: #e5e7eb;
}
.acf-profile-friend-decision-btn.is-accept {
  border-color: rgba(34,197,94,.34);
  background: rgba(34,197,94,.12);
  color: #bbf7d0;
}
.acf-profile-friend-decision-btn.is-reject {
  border-color: rgba(239,68,68,.34);
  background: rgba(239,68,68,.12);
  color: #fecaca;
}
.acf-profile-friend-decision-svg {
  width: 20px;
  height: 20px;
  display: block;
}
@media (max-width: 420px) {
  .acf-profile-page .acf-profile-actions.is-public-actions {
    gap: 5px !important;
  }
  .acf-profile-page .acf-profile-actions.is-public-actions .acf-profile-action-btn,
  .acf-profile-page .acf-profile-actions.is-public-actions .acf-profile-pill,
  .acf-profile-page .acf-profile-actions.is-public-actions .acf-profile-inline-form {
    min-width: 58px;
  }
  .acf-profile-friend-decision-text { font-size: 10.5px; }
}

/* friendship cancel/list hotfix 2026-05-17 */
.acf-profile-page .acf-profile-action-btn.is-friend-status-action.is-pending:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}
.acf-profile-page .acf-profile-friend-btn.is-warning {
  color: #fde68a;
  border-color: rgba(251,191,36,.32);
  background: rgba(251,191,36,.11);
}
.acf-profile-page .acf-profile-friend-btn.is-warning .acf-profile-friend-svg {
  width: 19px;
  height: 19px;
}
.acf-profile-page .acf-profile-friend-card.is-outgoing {
  border-color: rgba(251,191,36,.12);
  background: rgba(251,191,36,.035);
}

/* friendship ajax/subtabs polish 2026-05-17 */
.acf-profile-page .acf-profile-action-btn.is-friend-status-action.is-friend {
  border-color: rgba(34,197,94,.34) !important;
  background: rgba(34,197,94,.12) !important;
  color: #bbf7d0 !important;
}
.acf-profile-page a.acf-profile-action-btn.is-friend-status-action {
  text-decoration: none;
}
.acf-profile-page .acf-profile-friends-shell {
  display: grid;
  grid-template-columns: minmax(104px, 138px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.acf-profile-page .acf-profile-friend-subtabs {
  display: grid;
  gap: 8px;
  position: sticky;
  top: calc(var(--topbar) + 12px);
  align-self: start;
}
.acf-profile-page .acf-profile-friend-subtabs button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 17px;
  background: rgba(255,255,255,.045);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 9px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-align: start;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.acf-profile-page .acf-profile-friend-subtabs button:active { transform: scale(.985); }
.acf-profile-page .acf-profile-friend-subtabs button.is-active {
  color: #fff;
  border-color: rgba(45,212,191,.32);
  background: linear-gradient(135deg, rgba(45,212,191,.13), rgba(124,58,237,.11));
}
.acf-profile-page .acf-profile-friend-subtabs button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acf-profile-page .acf-profile-friend-subtabs button b {
  margin-inline-start: auto;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.09);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 950;
}
.acf-profile-page .acf-profile-friend-subtab-svg {
  width: var(--friend-subtab-icon-size, 20px);
  height: var(--friend-subtab-icon-size, 20px);
  flex: 0 0 auto;
  display: block;
}
.acf-profile-page .acf-profile-friend-subtabs.is-mode-icon button {
  justify-content: center;
  padding-inline: 8px;
}
.acf-profile-page .acf-profile-friend-subtabs.is-mode-icon button b {
  position: absolute;
  inset-inline-end: 4px;
  top: 4px;
  min-width: var(--friend-action-icon-size, 18px);
  height: var(--friend-action-icon-size, 18px);
  padding: 0 5px;
  font-size: 10px;
}
.acf-profile-page .acf-profile-friends-list {
  min-width: 0;
}
.acf-profile-page .acf-profile-friends-group {
  display: none;
}
.acf-profile-page .acf-profile-friends-group.is-active {
  display: grid;
}
.acf-profile-page .acf-profile-friend-card.is-highlighted {
  outline: 2px solid rgba(45,212,191,.72);
  box-shadow: 0 0 0 5px rgba(45,212,191,.13), 0 18px 36px rgba(0,0,0,.24);
}
.acf-profile-page .acf-profile-friend-btn.is-loading,
.acf-profile-page .acf-profile-action-btn.is-loading {
  opacity: .58;
  pointer-events: none;
}
@media (max-width: 540px) {
  .acf-profile-page .acf-profile-friends-shell {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 9px;
  }
  .acf-profile-page .acf-profile-friend-subtabs button {
    min-height: 42px;
    padding: 8px;
    border-radius: 15px;
    font-size: 11px;
  }
  .acf-profile-page .acf-profile-friend-subtabs button b {
    min-width: 21px;
    height: 21px;
    font-size: 10px;
  }
}


/* friendship sub-tabs inline polish 2026-05-17
   داخل تب الأصدقاء: نفس منطق تابات المشاركات/التعليقات، وليس قائمة جانبية. */
.acf-profile-page .acf-profile-friends-shell {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}
.acf-profile-page .acf-profile-friend-subtabs {
  position: relative !important;
  top: auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 10px 0 12px !important;
  padding: 5px !important;
  width: 100% !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.035) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.acf-profile-page .acf-profile-friend-subtabs::-webkit-scrollbar { display: none; }
.acf-profile-page .acf-profile-friend-subtabs button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  min-height: 36px !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: transparent !important;
  color: #aab5c8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 8px 12px !important;
  text-align: center !important;
  white-space: nowrap !important;
  font-size: var(--me-tab-font-size, 12px) !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}
.acf-profile-page .acf-profile-friend-subtabs button.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(124,58,237,.74), rgba(6,182,212,.48)) !important;
  box-shadow: 0 10px 22px rgba(6,182,212,.12) !important;
  border-color: transparent !important;
}
.acf-profile-page .acf-profile-friend-subtabs button span {
  max-width: 130px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acf-profile-page .acf-profile-friend-subtabs button b {
  margin-inline-start: 2px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: rgba(239,68,68,.92) !important;
  color: #fff !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}
.acf-profile-page .acf-profile-friend-subtab-svg {
  width: var(--friend-subtab-icon-size, var(--me-tab-icon-size, 22px)) !important;
  height: var(--friend-subtab-icon-size, var(--me-tab-icon-size, 22px)) !important;
  flex: 0 0 auto !important;
}
.acf-profile-page .acf-profile-friend-subtabs.is-mode-icon button {
  min-width: 42px !important;
  width: 42px !important;
  padding-inline: 0 !important;
}
.acf-profile-page .acf-profile-friend-subtabs.is-mode-icon button b {
  position: absolute !important;
  inset-inline-end: 0 !important;
  top: -2px !important;
  margin: 0 !important;
}
.acf-profile-page .acf-profile-friend-subtabs.is-mode-text .acf-profile-friend-subtab-svg {
  display: none !important;
}
.acf-profile-page .acf-profile-friends-list {
  min-width: 0 !important;
}
@media (max-width: 540px) {
  .acf-profile-page .acf-profile-friend-subtabs {
    gap: 6px !important;
    margin-top: 9px !important;
  }
  .acf-profile-page .acf-profile-friend-subtabs button {
    min-height: 34px !important;
    padding: 7px 10px !important;
    border-radius: 14px !important;
    font-size: 11px !important;
  }
  .acf-profile-page .acf-profile-friend-subtabs button span { max-width: 104px; }
}
