/*
 * XCHAT_INFO_EXTRAS_UI_V1
 * Shared desktop + mobile INFO additions.
 */

.xie-section {
  box-sizing: border-box;
  width: 100%;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid rgba(122, 138, 255, .38);
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(18, 20, 76, .88) 0%,
    rgba(9, 12, 48, .92) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(0,0,0,.18);
  font-size: 12px;
  line-height: 1.4;
}

.xie-title {
  font-weight: 700;
  margin-bottom: 2px;
  color: #ffffff;
}

.xie-hint {
  color: rgba(255,255,255,.72);
  font-size: 11px;
  margin-bottom: 7px;
}

.xie-textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 58px;
  resize: vertical;
  padding: 7px 8px;
  border: 1px solid rgba(122, 138, 255, .42);
  border-radius: 6px;
  background: rgba(7, 10, 42, .92);
  color: #f1fa8c;
  caret-color: #f1fa8c;
  font: inherit;
  line-height: 1.35;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
}

.xie-note-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: rgba(255,255,255,.82);
}

.xie-counter {
  color: rgba(255,255,255,.72);
  white-space: nowrap;
}

.xie-status {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(255,255,255,.82);
}

.xie-save {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(122, 138, 255, .45);
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  color: #f1fa8c;
  background: linear-gradient(
    180deg,
    rgba(32, 38, 118, .96) 0%,
    rgba(14, 18, 70, .96) 100%
  );
}
.xie-save:disabled {
  cursor: default;
  opacity: .55;
}

.xie-textarea::placeholder {
  color: rgba(241, 250, 140, .45);
}

.xie-textarea:focus {
  outline: none;
  border-color: rgba(241, 250, 140, .58);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,.35),
    0 0 0 1px rgba(241, 250, 140, .10);
}

.xie-admin-guest {
  border-style: dashed;
}

.xie-admin-fields {
  display: grid;
  gap: 4px;
}

.xie-admin-row {
  overflow-wrap: anywhere;
}

.xie-admin-key {
  font-weight: 700;
}

.mobile-info-card .xie-section {
  margin-top: 12px;
  font-size: 13px;
}

.mobile-info-card .xie-textarea {
  min-height: 76px;
  font-size: 16px;
}

.mobile-info-card .xie-save {
  min-height: 34px;
}


/*
 * XCHAT_GUEST_INFO_BAN_V1
 */

.xie-ban-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .11);
}

.xie-ban-state {
  min-width: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
}

.xie-ban-state.is-active {
  color: #ffb7b7;
}

.xie-ban-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 106, 122, .55);
  border-radius: 5px;
  background:
    linear-gradient(
      180deg,
      rgba(125, 35, 54, .96) 0%,
      rgba(74, 20, 36, .96) 100%
    );
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.xie-ban-button:hover:not(:disabled) {
  filter: brightness(1.08);
}

.xie-ban-button.is-unban {
  border-color: rgba(131, 172, 255, .5);
  background:
    linear-gradient(
      180deg,
      rgba(37, 58, 125, .96) 0%,
      rgba(20, 29, 74, .96) 100%
    );
  color: #f1fa8c;
}

.xie-ban-button:disabled {
  cursor: default;
  opacity: .58;
}

.mobile-info-card .xie-ban-box {
  align-items: stretch;
  flex-direction: column;
}

.mobile-info-card .xie-ban-button {
  width: 100%;
  min-height: 38px;
}

/*
 * XCHAT_PRIVATE_NOTE_VIEW_MODE_V1
 *
 * Saved notes are presentation first.
 * The textarea only exists visually while adding/editing.
 */

.xie-note-view[hidden],
.xie-note-editor[hidden] {
  display: none;
}

.xie-note-view {
  margin-top: 7px;
}

.xie-note-read {
  min-height: 18px;
  padding: 8px 10px;
  border: 1px solid rgba(120,150,220,.28);
  border-radius: 4px;
  background: rgba(7,14,45,.34);
  color: rgba(255,255,255,.94);
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.xie-note-view-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 6px;
}

.xie-note-edit {
  white-space: nowrap;
}

.xie-note-cancel {
  opacity: .88;
  white-space: nowrap;
}

.xie-note-editor {
  margin-top: 7px;
}


/*
 * XCHAT_PUBLIC_PROFILE_V1
 */

.xie-public-profile {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 7px 0 0;
  padding: 6px 8px;
}

.xie-public-profile-title {
  flex: 0 0 auto;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.xie-public-profile-link {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #8ecbff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  text-overflow: ellipsis;
  text-shadow:
    0 0 6px rgba(88, 154, 255, .50);
  white-space: nowrap;
  transition:
    color .15s ease,
    text-shadow .15s ease;
}

.xie-public-profile-link:hover {
  color: #ff9ac9;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-shadow:
    0 0 8px rgba(255, 121, 185, .62),
    0 0 18px rgba(255, 81, 164, .38);
}

.xie-public-profile-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin: 0 0 0 auto;
}

.xie-public-profile-open,
.xie-public-profile-copy {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  width: 27px;
  height: 24px;
  min-width: 27px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(142, 203, 255, .65);
  border-radius: 5px;
  background:
    linear-gradient(
      180deg,
      rgba(49, 75, 161, .82),
      rgba(20, 29, 92, .90)
    );
  color: #8ecbff;
  box-shadow:
    inset 0 0 7px rgba(92, 151, 255, .18),
    0 0 6px rgba(83, 145, 255, .20);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-shadow:
    0 0 6px rgba(88, 154, 255, .55);
  cursor: pointer;
  transition:
    color .15s ease,
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease,
    text-shadow .15s ease;
}

.xie-public-profile-open:hover,
.xie-public-profile-copy:hover {
  border-color: rgba(255, 154, 201, .88);
  background:
    linear-gradient(
      180deg,
      rgba(115, 34, 91, .80),
      rgba(67, 19, 68, .90)
    );
  color: #ff9ac9;
  box-shadow:
    inset 0 0 8px rgba(255, 121, 185, .18),
    0 0 9px rgba(255, 81, 164, .28);
  text-shadow:
    0 0 8px rgba(255, 121, 185, .62),
    0 0 18px rgba(255, 81, 164, .38);
}



/*
 * XCHAT_DESKTOP_INFO_TABS_CSS_V1
 *
 * Activated only when the desktop extension adds
 * .xip-tabs-enabled to the canonical popup root.
 */

.xip-tabs-enabled .xip-body > hr {
  display: none;
}


.xip-tabs-enabled .xip-tabs {
  position: relative;
  margin-top: 8px;
}


.xip-tabs-enabled .xip-tab-radio {
  position: absolute;

  width: 1px;
  height: 1px;

  margin: 0;

  opacity: 0;

  pointer-events: none;
}


.xip-tabs-enabled .xip-tabs-nav {
  display: grid;

  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );

  gap: 2px;

  align-items: end;

  padding:
    0 1px;

  border-bottom:
    1px solid
    rgba(102, 120, 220, 0.58);
}


.xip-tabs-enabled
.xip-tabs-nav
label {
  min-width: 0;

  padding:
    6px 3px 5px;

  overflow: hidden;

  border:
    1px solid
    rgba(75, 91, 181, 0.7);

  border-bottom:
    0;

  border-radius:
    6px 6px 0 0;

  background:
    linear-gradient(
      180deg,
      rgba(35, 44, 115, 0.96),
      rgba(10, 15, 58, 0.98)
    );

  color:
    #cfd5ff;

  font-size:
    10.5px;

  line-height:
    1.15;

  text-align:
    center;

  text-overflow:
    ellipsis;

  white-space:
    nowrap;

  cursor:
    pointer;

  opacity:
    0.84;

  user-select:
    none;
}


.xip-tabs-enabled
.xip-tabs-nav
label:hover {
  color:
    #ffffff;

  border-color:
    #8b98ee;

  opacity:
    1;
}


.xip-tabs-enabled
.xip-tabs-panels {
  min-height: 78px;

  padding-top:
    6px;
}


.xip-tabs-enabled
.xip-tab-panel {
  display: none;

  max-height:
    min(43vh, 340px);

  padding:
    1px 3px 5px;

  overflow-x:
    hidden;

  overflow-y:
    auto;

  scrollbar-width:
    thin;
}


.xip-tabs-enabled
#xip-tab-profile:checked
~ .xip-tabs-nav
label[for="xip-tab-profile"],

.xip-tabs-enabled
#xip-tab-achievements:checked
~ .xip-tabs-nav
label[for="xip-tab-achievements"],

.xip-tabs-enabled
#xip-tab-gifts:checked
~ .xip-tabs-nav
label[for="xip-tab-gifts"],

.xip-tabs-enabled
#xip-tab-quiz:checked
~ .xip-tabs-nav
label[for="xip-tab-quiz"],

.xip-tabs-enabled
#xip-tab-more:checked
~ .xip-tabs-nav
label[for="xip-tab-more"] {
  color:
    #ffe66d;

  border-color:
    #9ca8ff;

  background:
    linear-gradient(
      180deg,
      rgba(51, 61, 151, 0.99),
      rgba(17, 22, 78, 0.99)
    );

  box-shadow:
    0 -1px 7px
    rgba(98, 117, 255, 0.22);

  opacity:
    1;
}


.xip-tabs-enabled
#xip-tab-profile:checked
~ .xip-tabs-panels
[data-xip-tab-panel="profile"],

.xip-tabs-enabled
#xip-tab-achievements:checked
~ .xip-tabs-panels
[data-xip-tab-panel="achievements"],

.xip-tabs-enabled
#xip-tab-gifts:checked
~ .xip-tabs-panels
[data-xip-tab-panel="gifts"],

.xip-tabs-enabled
#xip-tab-quiz:checked
~ .xip-tabs-panels
[data-xip-tab-panel="quiz"],

.xip-tabs-enabled
#xip-tab-more:checked
~ .xip-tabs-panels
[data-xip-tab-panel="more"] {
  display: block;
}


.xip-tabs-enabled
[data-xip-tab-panel="achievements"]
.xip-achievements,

.xip-tabs-enabled
[data-xip-tab-panel="gifts"]
.xip-gifts {
  margin-top: 0;
}


.xip-tabs-enabled
[data-xip-tab-panel="more"]
[data-xchat-info-extra]:first-child {
  margin-top: 0;
}
