/* OLONE glass drop-down (assets/olone-glass-select.js): field button + glass list, same look as the settings menus. */

select.olone-gs-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
}

.olone-gs-btn {
  position: relative;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 40px 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(132, 170, 224, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: #f2f6ff;
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

/* The window's own field rules for the select may add a background chevron; ours is the svg. */
.olone-gs-btn.olone-gs-btn {
  background-image: none !important;
  padding-right: 40px !important;
  appearance: none;
  -webkit-appearance: none;
}

.olone-gs-btn:hover {
  border-color: rgba(132, 170, 224, 0.32);
}

.olone-gs-btn:focus-visible,
.olone-gs-btn.is-open {
  outline: none;
  border-color: rgba(81, 143, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(55, 124, 255, 0.12);
}

.olone-gs-btn.is-disabled {
  opacity: 0.5;
  cursor: default;
}

.olone-gs-btn__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.olone-gs-btn__chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  fill: none;
  stroke: #a9bbd8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
  pointer-events: none;
}

.olone-gs-btn.is-open .olone-gs-btn__chevron {
  transform: rotate(180deg);
}

/* Channel invite form: the select had its own darker field. */
#channelSettingsV2Modal .channel-invite-field .olone-gs-btn {
  min-height: 44px;
  border-radius: 11px;
  color: #edf3ff;
  background-color: rgba(11, 20, 34, 0.86);
  border-color: rgba(85, 126, 192, 0.23);
  font-size: 14px;
}

.olone-gs-list {
  position: fixed;
  z-index: 31000;
  box-sizing: border-box;
  padding: 6px;
  display: grid;
  gap: 2px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 14px;
  border: 1px solid rgba(132, 170, 224, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 144, 255, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(20, 38, 65, 0.98), rgba(10, 24, 45, 0.98));
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 160, 210, 0.28) transparent;
  animation: olone-gs-in 120ms ease-out;
}

.olone-gs-list.is-up {
  animation-name: olone-gs-in-up;
}

@keyframes olone-gs-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@keyframes olone-gs-in-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.olone-gs-opt {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ecf4ff;
  text-align: left;
  cursor: pointer;
  font: 700 13px/17px Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  transition: background 0.12s ease;
}

.olone-gs-opt.is-active {
  background: rgba(132, 170, 224, 0.1);
}

.olone-gs-opt[aria-selected="true"] {
  background: rgba(81, 143, 255, 0.16);
  color: #fff;
}

.olone-gs-opt[aria-selected="true"].is-active {
  background: rgba(81, 143, 255, 0.22);
}

.olone-gs-opt:disabled {
  opacity: 0.45;
  cursor: default;
}

.olone-gs-opt__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.olone-gs-opt__check {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #7fb0ff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.olone-gs-opt[aria-selected="true"] .olone-gs-opt__check {
  opacity: 1;
}

@media (max-width: 920px) {
  .olone-gs-opt {
    min-height: 44px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .olone-gs-list {
    animation: none;
  }
}
