/* Poosting - BUSCA DE USUÁRIOS / AMIGOS */

.search-page-shell {
  width: min(980px, calc(100% - 20px));
  margin: 16px auto 30px;
}

.search-main-card {
  overflow: hidden;
  min-height: 520px;
  border-radius: 0 38px 0 0;
}

.search-page-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #c7d5e3;
}

.search-page-header h1 {
  margin: 0;
  color: #111;
  font-size: 30px;
  font-weight: 400;
}

.search-page-header p {
  margin: 5px 0 0;
  color: #6d7a84;
}

.big-search-form {
  display: flex;
  gap: 7px;
  padding: 14px;
  background: #eef6fc;
  border-bottom: 1px solid #c8d8e6;
}

.big-search-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #a9bfd2;
  outline: 0;
}

.big-search-form input:focus {
  border-color: #6595bd;
  box-shadow: 0 0 0 2px rgba(82,134,179,.12);
}

.big-search-form button {
  padding: 9px 18px;
  border: 1px solid #4e7da5;
  border-radius: 3px;
  background: linear-gradient(#78a7cf, #5385af);
  color: #fff;
  cursor: pointer;
}

.search-status {
  min-height: 20px;
  padding: 10px 14px 0;
  color: #6d7b86;
  font-size: 12px;
}

.search-results {
  margin-top: 5px;
}

.user-result-card {
  display: grid;
  grid-template-columns: 92px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 12px 14px;
  border-bottom: 1px solid #c6d6e4;
}

.user-result-card:nth-child(odd) {
  background: #e9f3fc;
}

.user-result-card:nth-child(even) {
  background: #dcecf9;
}

.user-result-avatar {
  width: 78px;
  height: 78px;
  object-fit: cover;
  display: block;
  border: 1px solid #aebdca;
  background: #edf2f7;
}

.user-result-main {
  min-width: 0;
}

.user-result-name {
  display: inline-block;
  margin-bottom: 4px;
  color: #2e6f97;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

.user-result-name:hover {
  text-decoration: underline;
}

.user-result-meta {
  margin: 2px 0;
  color: #687680;
  font-size: 12px;
}

.user-result-about {
  margin: 6px 0 0;
  color: #384249;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.user-result-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.friend-button,
.open-profile-button,
.request-action-button {
  min-width: 145px;
  padding: 7px 10px;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
}

.friend-button {
  border: 1px solid #4f7fa8;
  background: linear-gradient(#76a6cf, #5385ae);
  color: #fff;
}

.friend-button.pending {
  border-color: #b5a365;
  background: linear-gradient(#fff4c2, #eadc9b);
  color: #745f15;
}

.friend-button.friend {
  border-color: #739778;
  background: linear-gradient(#e6f3e8, #cbe0cf);
  color: #356a3d;
}

.friend-button:disabled {
  opacity: .72;
  cursor: default;
}

.open-profile-button {
  border: 1px solid #a8bdce;
  background: linear-gradient(#fff, #e8f0f6);
  color: #47718f;
}

.empty-search {
  min-height: 250px;
  padding: 45px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #73808a;
  text-align: center;
}

.empty-search-icon {
  margin-bottom: 8px;
  font-size: 35px;
}

.empty-search strong {
  margin-bottom: 4px;
  color: #526774;
}

/* AMIGOS */

.friends-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #d3dfe8;
  background: #f7fafc;
}

.friends-tab {
  padding: 7px 10px;
  border: 1px solid #b8cad9;
  border-radius: 3px;
  background: linear-gradient(#fff, #e7f0f7);
  color: #47718f;
  cursor: pointer;
}

.friends-tab.active {
  border-color: #648fb3;
  background: linear-gradient(#73a0c5, #4d7fa9);
  color: #fff;
}

.friends-tab span {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(0,0,0,.10);
  font-size: 10px;
}

.request-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.request-action-button.accept {
  border: 1px solid #709b7a;
  background: linear-gradient(#e5f5e8, #c8e2ce);
  color: #2e6d3d;
}

.request-action-button.reject {
  border: 1px solid #bba5a5;
  background: linear-gradient(#fff, #eee4e4);
  color: #8a4040;
}

@media (max-width: 700px) {
  .search-page-shell {
    width: calc(100% - 12px);
    margin-top: 8px;
  }

  .search-main-card {
    border-radius: 7px;
  }

  .search-page-header h1 {
    font-size: 24px;
  }

  .big-search-form {
    flex-direction: column;
  }

  .user-result-card {
    grid-template-columns: 70px minmax(0,1fr);
  }

  .user-result-avatar {
    width: 60px;
    height: 60px;
  }

  .user-result-actions,
  .request-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .friend-button,
  .open-profile-button,
  .request-action-button {
    min-width: 0;
    flex: 1;
  }
}


/* CORREÇÃO: esconder corretamente estados vazios em Amigos */
.friends-empty[hidden],
.requests-empty[hidden],
.empty-state[hidden],
.friends-list-empty[hidden],
.requests-list-empty[hidden] {
  display: none !important;
}


/* Seletores exatos encontrados em amigos.php */
#friendsEmpty[hidden] {
  display: none !important;
}


/* =========================================================
   MOBILE - BLOQUEIO DE ZOOM
   ========================================================= */

html,
body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

input,
textarea,
select,
button {
  font-size: 16px;
}

@media (min-width: 701px) {
  input,
  textarea,
  select,
  button {
    font-size: inherit;
  }
}

/* AMIGOS: mantém @username + selo em uma linha própria abaixo do nome */
#friendsList .user-result-main > .user-result-meta.orkutis-verified-inline {
  display: flex !important;
  width: max-content;
  max-width: 100%;
  align-items: center;
  margin-top: 2px;
  margin-bottom: 2px;
}

#friendsList .user-result-main > .user-result-name + .user-result-meta.orkutis-verified-inline {
  clear: both;
}
