/* "Меньше эффектов" in settings */
html.olone-less-effects *,
html.olone-less-effects *::before,
html.olone-less-effects *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Left panel: smaller side margins so the profile and music cards use the width */
@media (min-width: 768px) {
  :root .col-user.panel-card > .panel-scroll {
    padding-left: 6px;
    padding-right: 6px;
  }

  .col-user #settingsPanel {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* A track on its own is one card, without the message plate around it */
.bubble:not(.bubble--gc-layout).bubble--has-media:has(.bubble-audio):not(:has(.bubble-body:not(:empty))),
.bubble.bubble--gc-layout .gc-message-bubble.gc-message-bubble--has-media:has(.bubble-audio):not(:has(.bubble-body:not(:empty))) {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

/* Unread from other chats on the way back from a forum */
.gc-topics-back-btn__badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.gc-topics-back-btn__badge[hidden] {
  display: none;
}

/* Settings in the glass gradient look instead of grey blocks */
html.olone-glass[data-theme="dark"] .modal--settings-hub,
html.olone-glass[data-theme="dark"] .modal--settings-detail {
  border: 1px solid rgba(140, 170, 255, 0.2);
  background: linear-gradient(155deg, rgba(24, 36, 74, 0.98), rgba(18, 20, 46, 0.98) 55%, rgba(30, 20, 58, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 26px 70px rgba(0, 0, 0, 0.55);
}

html.olone-glass[data-theme="dark"] .settings-nested-sheet {
  background: transparent;
}

html.olone-glass[data-theme="dark"] .settings-hub-col {
  border-color: rgba(140, 170, 255, 0.12);
  background: rgba(70, 96, 170, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.olone-glass[data-theme="dark"] .settings-hub-item-btn {
  border-color: rgba(140, 170, 255, 0.12);
  background: linear-gradient(150deg, rgba(70, 96, 170, 0.14), rgba(60, 44, 120, 0.1));
}

html.olone-glass[data-theme="dark"] .settings-hub-item-btn:hover {
  border-color: rgba(140, 170, 255, 0.3);
  background: linear-gradient(150deg, rgba(70, 96, 170, 0.24), rgba(60, 44, 120, 0.18));
}

html.olone-glass[data-theme="dark"] .settings-hub-item-btn.is-active {
  border-color: rgba(120, 160, 255, 0.55);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.26), rgba(139, 92, 246, 0.2));
}

html.olone-glass[data-theme="dark"] .settings-v37-group,
html.olone-glass[data-theme="dark"] .privacy-consent-card {
  border-color: rgba(140, 170, 255, 0.14);
  background: linear-gradient(150deg, rgba(70, 96, 170, 0.14), rgba(60, 44, 120, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html.olone-glass[data-theme="dark"] .settings-v37-row {
  border-top-color: rgba(140, 170, 255, 0.1);
}

/* Tabs of the channel settings window with OLONE's icons */
.chat-settings-section-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-settings-section-btn__icon {
  display: inline-flex;
}

.topic-item__icon svg {
  display: block;
}

/* Topic icons in the list, on the choose button and in the picker */
.topic-icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.col-dialogs--gc-topics .topic-item__icon--text {
  padding: 2px;
  border: none;
  background: none;
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
}

.gc-topic-emoji-btn {
  padding: 5px;
}

.gc-topic-emoji-opt {
  width: 40px;
  height: 40px;
  padding: 4px;
}

/* The badge next to a name and the picker in Premium settings */
.premium-crown-inline--badge {
  filter: none;
  margin-left: 4px;
}

.premium-crown-inline--badge img,
.voice-participant-premium-icon img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.name-badge-picker__title {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.name-badge-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.name-badge-picker__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid rgba(140, 170, 255, 0.14);
  border-radius: 12px;
  background: rgba(70, 96, 170, 0.1);
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.name-badge-picker__item:hover {
  border-color: rgba(140, 170, 255, 0.34);
}

.name-badge-picker__item.is-active {
  border-color: rgba(236, 196, 90, 0.8);
  background: rgba(236, 196, 90, 0.12);
}

.name-badge-picker__item.is-locked {
  border-style: dashed;
}

.name-badge-picker__hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.name-badge-picker__item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* A pinned chat in the list: no pin picture, the row itself is a touch lighter, so it stands out
   without changing the look of the list. */
.dialog-item.dialog-item--pinned:not(.active) {
  position: relative;
  background: rgba(140, 170, 255, 0.07);
}

.dialog-item.dialog-item--pinned:not(.active):hover {
  background: rgba(140, 170, 255, 0.11);
}

/* Main settings sections use drawn pictures, without the small tinted tile */
.settings-hub-item-btn .settings-hub-item-icon:has(.settings-hub-image) {
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.settings-hub-item-btn.is-active .settings-hub-item-icon:has(.settings-hub-image) {
  box-shadow: none;
}

.settings-hub-admin-icon:has(.settings-hub-image) {
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.settings-hub-image {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* Topic windows: the icon stands level with the name field, the same height */
.modal-backdrop .gc-topic-icon-name {
  flex-wrap: nowrap;
  align-items: flex-end;
}

.modal-backdrop .gc-topic-icon-name .gc-topic-emoji-btn {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin: 0;
}

.modal-backdrop .gc-topic-icon-name .gc-topic-control {
  height: 46px;
}

/* A new page version is available */
.olone-update-hint {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 13000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px 10px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(140, 170, 255, 0.3);
  border-radius: 14px;
  background: rgba(21, 26, 46, 0.97);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  color: #f3f5fa;
  font-size: 14px;
}

.olone-update-hint[hidden] {
  display: none;
}

.olone-update-hint__reload {
  padding: 7px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.olone-update-hint__later {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}

/* People banned from a voice room, in its settings */
.gc-voice-bans {
  margin-top: 14px;
}

.gc-voice-bans.hidden {
  display: none;
}

.gc-voice-bans__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
}

.gc-voice-bans__empty {
  padding: 6px 0;
  color: var(--muted);
  font-size: 13px;
}

/* A giveaway in a channel: what it is, how it stands, and what to do */
.channel-post-giveaway-host.bubble-giveaway {
  width: 100%;
  max-width: 380px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(91, 141, 239, 0.16), rgba(139, 92, 246, 0.14));
  border: 1px solid rgba(142, 180, 248, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.bubble-giveaway-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bubble-giveaway-pic {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.bubble-giveaway-head .bubble-giveaway-badge {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.bubble-giveaway-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #6ee7a8;
  background: rgba(61, 220, 132, 0.14);
}

.bubble-giveaway-status--done {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.bubble-giveaway .bubble-giveaway-meta-list {
  gap: 0;
  margin-bottom: 12px;
  font-size: 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.bubble-giveaway .bubble-giveaway-meta-row {
  justify-content: space-between;
  padding: 8px 12px;
  color: var(--text);
}

.bubble-giveaway .bubble-giveaway-meta-row + .bubble-giveaway-meta-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bubble-giveaway .bubble-giveaway-cta,
.bubble-giveaway .bubble-giveaway-draw-btn {
  width: 100%;
  min-height: 42px;
  margin: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #3f7bff, #6d5ef5);
}

.bubble-giveaway .bubble-giveaway-hint {
  margin: 0;
  padding: 2px 2px 0;
  font-size: 13px;
  text-align: center;
}

.bubble-giveaway-winner-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.bubble-giveaway-winner-id {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.09);
}

.phone-profile-btn {
  display: none;
}

/* The number of friends is shown to nobody now, so there is nothing to choose. */
:has(> #profileVisShareFriends) {
  display: none !important;
}

/* Topics and voice rooms: just the picture, no plate around it. */
.col-dialogs.col-dialogs--gc-topics .topic-item .topic-item__icon,
.col-dialogs.col-dialogs--gc-topics .topic-item .topic-item__icon--text,
.col-dialogs.col-dialogs--gc-topics .topic-item .topic-item__icon--voice {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-size: 26px;
}

.col-dialogs.col-dialogs--gc-topics .topic-item .topic-item__icon .topic-icon-img {
  width: 34px;
  height: 34px;
}

.ch-views-icon--picture {
  flex: 0 0 16px;
  object-fit: contain;
  stroke: none;
}

.channel-giveaway-source {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(142, 180, 248, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.channel-giveaway-source:hover {
  background: rgba(255, 255, 255, 0.09);
}

.channel-giveaway-source img {
  flex: 0 0 30px;
  object-fit: contain;
}

.channel-giveaway-source__body {
  display: grid;
  min-width: 0;
}

.channel-giveaway-source__title {
  font-size: 13px;
  font-weight: 600;
}

.channel-giveaway-source__text {
  overflow: hidden;
  font-size: 12px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Role pictures: in role lists, member rows and voice room tiles */
.role-icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#groupChatSettingsModal .gcs-role-row__icon,
#groupChatSettingsModal .gcs-roles__details-icon {
  padding: 3px;
  border: none;
  background: none;
  box-shadow: none;
}

.group-chat-profile-member-role .role-icon-img {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-right: 5px;
}

#groupChatSettingsModal .gcs-join-requests__badge.hidden {
  display: none;
}

.channel-profile-subscriber-row__meta .role-icon-img,
.channel-settings-v2__role-row .role-icon-img,
#channelSettingsV2OwnerLabel .role-icon-img {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 5px;
  vertical-align: -3px;
}

.voice-participant-role-icon {
  display: inline-flex;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.voice-participant-role-icon.hidden {
  display: none;
}

.gc-voice-member__crown {
  display: inline-flex;
  width: 18px;
  height: 18px;
}
