/* Application-owned controls: the browser only supplies text input and focus. */
.ui-modal-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  isolation: isolate;
  background: rgba(34, 20, 48, .56);
}

.ui-modal-layer.is-nested { background: rgba(31, 18, 45, .36); }

.ui-modal-layer > .admin-dialog {
  position: relative;
  inset: auto;
  z-index: 1;
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  outline: none;
  overflow: hidden;
}

.ui-modal-layer > .admin-dialog:focus-visible { outline: 2px solid #bb9cde; outline-offset: 3px; }

.ui-modal-layer .btn-close {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0 0 0 12px;
  padding: 0;
  border: 0;
  background: rgba(139, 96, 182, .055);
  box-shadow: none;
  color: #8f7aa0;
  opacity: 1;
}

.ui-modal-layer .btn-close::before,
.ui-modal-layer .btn-close::after {
  position: absolute;
  top: 8px;
  left: 15px;
  width: 1.5px;
  height: 16px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.ui-modal-layer .btn-close::before { transform: rotate(45deg); }
.ui-modal-layer .btn-close::after { transform: rotate(-45deg); }
.ui-modal-layer .btn-close:hover { background: #ece2f6; color: #72469d; }
.ui-modal-layer .btn-close:focus-visible { outline: 2px solid #9f75c9; outline-offset: 2px; }

.ui-confirm-dialog {
  width: 420px;
  max-height: calc(100dvh - 40px);
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 20px;
  background: #fcfaff;
  box-shadow: 0 26px 80px rgba(28, 12, 47, .26), 0 7px 22px rgba(28, 12, 47, .08), inset 0 1px 0 #fff;
}

.ui-modal-layer > .ui-confirm-dialog { display: flex; flex-direction: column; }
.ui-confirm-body { min-height: 0; overflow-y: auto; padding: 30px 30px 25px; }
.ui-confirm-symbol { display: flex; width: 46px; height: 46px; align-items: center; justify-content: center; margin-bottom: 19px; border: 1px solid #e9def6; border-radius: 14px; background: #f0e8fa; color: #8655b5; }
.ui-confirm-symbol svg { width: 23px; height: 23px; }
.ui-confirm-body h2 { margin: 0 0 11px; color: #382747; font-size: 20px; font-weight: 600; line-height: 1.5; }
.ui-confirm-body p { margin: 0; color: #877291; font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; white-space: pre-wrap; }
.ui-confirm-actions { flex: none; gap: 10px; padding: 18px 26px; border-top: 1px solid #eee5f6; background: #f8f3fc; }
.ui-confirm-actions .btn { min-width: 90px; }
.ui-confirm-dialog.is-danger .ui-confirm-symbol { border-color: #efd9e2; background: #faedf2; color: #bd6c8a; }
.ui-confirm-dialog.is-danger .btn-primary { border-color: #b5607f; background: linear-gradient(110deg, #c77c99, #ad5a7c); box-shadow: 0 4px 12px rgba(159, 74, 109, .15); }
.ui-confirm-dialog.is-danger .btn-primary:hover { border-color: #a65171; background: #aa5477; }

.ui-select-trigger.form-select {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 41px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid #e1daea;
  border-radius: 9px;
  background: rgba(255, 255, 255, .9);
  background-image: none;
  box-shadow: inset 0 1px 2px rgba(61, 38, 84, .025), 0 1px 0 rgba(255, 255, 255, .7);
  color: #5e4e70;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.ui-select-trigger.form-select:hover { border-color: #c7b3dd; background-color: #fff; }
.ui-select-trigger.form-select:focus-visible,
.ui-select-trigger.form-select[aria-expanded="true"] { outline: none; border-color: #ad8bd2; background-color: #fff; box-shadow: 0 0 0 3px rgba(132, 86, 188, .1); }
.ui-select-trigger.form-select[aria-invalid="true"] { border-color: #c9839b; }
.ui-select-trigger.form-select:disabled { border-color: #e6e0ed; background: #f4f0f8; color: #aaa0b4; cursor: not-allowed; box-shadow: none; }
.ui-select-value { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-select-arrow { flex: 0 0 18px; width: 18px; height: 18px; color: #a48db8; transition: transform .16s ease; }
.ui-select-trigger[aria-expanded="true"] .ui-select-arrow { transform: rotate(180deg); }

.ui-select-list {
  position: fixed;
  z-index: 3100;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(224, 210, 239, .86);
  border-radius: 13px;
  background: #fdfbff;
  box-shadow: 0 15px 40px rgba(57, 28, 85, .14), 0 3px 10px rgba(57, 28, 85, .06), inset 0 1px 0 #fff;
  color: #655071;
  scrollbar-width: thin;
  scrollbar-color: #d7c8e6 transparent;
}

.ui-modal-layer > .ui-select-list { z-index: 4; }
.ui-select-option { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 11px; border-radius: 8px; font-size: 13px; line-height: 1.6; cursor: pointer; user-select: none; }
.ui-select-option > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.ui-select-option.is-active { background: #f2ebf9; color: #70449a; }
.ui-select-option[aria-selected="true"] { color: #8350b5; font-weight: 600; }
.ui-select-option[aria-selected="true"].is-active { background: #eee3f8; }
.ui-select-check { flex: 0 0 16px; visibility: hidden; color: #8c5cbc; font-size: 15px; font-weight: 500; }
.ui-select-option[aria-selected="true"] .ui-select-check { visibility: visible; }
.ui-select-option[aria-disabled="true"] { color: #b6aabc; cursor: not-allowed; }

@media (max-width: 700px) {
  .ui-modal-layer { padding: 10px; }
  .ui-modal-layer > .admin-dialog { max-width: 100%; max-height: calc(100dvh - 24px); }
  .ui-confirm-body { padding: 25px 24px 22px; }
  .ui-confirm-actions { padding: 16px 21px; }
  .ui-confirm-body h2 { font-size: 19px; }
  .ui-select-trigger.form-select { min-height: 42px; }
  .ui-select-option { min-height: 43px; }
}

@media (prefers-reduced-motion: reduce) {
  .ui-select-trigger.form-select,
  .ui-select-arrow { transition: none; }
}
