.friends-window {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #2c1907;
  font-size: 12px;
}

.friends-tabs {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.friends-tab {
  min-width: 118px;
  height: 24px;
  border: 1px solid #7f5929;
  border-bottom: 0;
  background: linear-gradient(180deg, #f3ddb3 0%, #dcc08a 100%);
  color: #4d2c11;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.friends-tab.is-active {
  background: linear-gradient(180deg, #fff2d1 0%, #ead0a0 100%);
}

.friends-panel {
  display: none;
  border: 1px solid #8d6736;
  background: linear-gradient(180deg, #f7e7c2 0%, #ecd4a5 100%);
  padding: 10px;
}

.friends-panel.is-active {
  display: block;
}

.friends-search-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.friends-search-row label {
  font-weight: 700;
}

#friends-search-input,
#friends-ignore-input {
  width: 100%;
  height: 22px;
  border: 1px solid #8f6e3f;
  background: #fffdf3;
  color: #2f1a07;
  padding: 1px 6px;
  font-size: 12px;
}

.friends-search-ok {
  width: 28px;
  height: 22px;
  border: 1px solid #8f6e3f;
  background: linear-gradient(180deg, #f9e3ba 0%, #dcbc85 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.friends-search-ok img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.friends-count {
  min-width: 44px;
  text-align: right;
  font-size: 11px;
  color: #5d3a17;
}

.friends-table-wrap {
  max-height: 282px;
  overflow: auto;
  border: 1px solid #9a7542;
  background: #fffdf7;
}

.friends-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.friends-table thead th {
  height: 20px;
  border-bottom: 1px solid #8d6736;
  border-right: 1px solid #b69562;
  background: #ecd3a4;
  color: #4f2f12;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  padding: 0 5px;
}

.friends-table thead th:last-child {
  border-right: 0;
}

.guild-online-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-left: 4px;
}

.guild-online-dot.is-online {
  background: #4aa23d;
}

.guild-online-dot.is-offline {
  background: #6d6d6d;
}

.guild-online-dot.is-unknown {
  background: #8d8d8d;
}

.friends-table tbody td {
  min-height: 16px;
  color: #5f3c19;
  font-size: 11px;
}

.friends-table tbody td:last-child {
  border-right: 0;
}

.friends-col-index {
  width: 26px;
  text-align: center;
}

.friends-col-rank,
.friends-col-alliance,
.friends-col-status,
.friends-col-online {
  width: 72px;
}

.friends-col-guild {
  width: 90px;
}

.friends-name-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: #3a220f;
  font-size: 12px;
  text-decoration: underline;
  text-align: left;
}

.friends-row.is-selected {
  background: #f1ddb6;
}

.friends-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.friends-online-dot.is-online {
  background: #4aa23d;
}

.friends-online-dot.is-offline {
  background: #6d6d6d;
}

.friends-online-dot.is-sleeping {
  background: #1c4fa0;
}

.friends-online-dot.is-unknown {
  background: #8d8d8d;
}

.friends-empty {
  text-align: center;
  color: #694320;
  font-style: italic;
}

.friends-tree-card {
  border: 1px solid #8f6838;
  background: #fff7e2;
  padding: 10px;
  margin-bottom: 8px;
}

.friends-tree-card h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.friends-tree-card p {
  margin: 4px 0;
}

.friends-tree-request {
  margin-top: 8px;
  min-width: 190px;
  height: 25px;
  border: 1px solid #7f5929;
  background: linear-gradient(180deg, #f8e2bc 0%, #ddb87f 100%);
  color: #3e250f;
  font-weight: 700;
}

.friends-tree-request:disabled {
  opacity: 0.55;
}

.friends-howto {
  border: 1px dashed #9c7a46;
  background: rgba(255, 248, 226, 0.75);
  padding: 8px;
}

.friends-howto p {
  margin: 3px 0;
}

.friends-ignore-placeholder {
  border: 1px dashed #a98a57;
  background: rgba(255, 248, 226, 0.75);
  padding: 10px;
  color: #5d3b19;
}

.friends-footer {
  min-height: 16px;
  color: #5f3c19;
  font-size: 11px;
}
