:root{
  --ui-control-bg:#0b091b;
  --ui-control-bg-hover:#100d24;
  --ui-control-border:#302b53;
  --ui-control-border-hover:#51437e;
  --ui-control-text:#f7f5ff;
  --ui-control-placeholder:#746e91;
  --ui-focus:#9b67ff;
  --ui-focus-ring:#9b67ff33;
  --ui-error:#ff6f88;
  --ui-error-ring:#ff42652b;
  --ui-success:#4dffad;
  --ui-success-ring:#4dffad24;
  --ui-disabled:#625d79;
  --ui-radius:11px;
  --ui-height:46px;
}

:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea){
  width:100%;
  margin-top:6px;
  border:1px solid var(--ui-control-border);
  border-radius:var(--ui-radius);
  background-color:var(--ui-control-bg);
  color:var(--ui-control-text);
  padding:12px 13px;
  outline:none;
  font:inherit;
  line-height:1.35;
  box-shadow:inset 0 1px 0 #ffffff05;
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease;
}

:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),select){
  min-height:var(--ui-height);
}

:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea):hover:not(:disabled){
  border-color:var(--ui-control-border-hover);
  background-color:var(--ui-control-bg-hover);
}

:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea):focus,
:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea):focus-visible{
  border-color:var(--ui-focus);
  box-shadow:0 0 0 3px var(--ui-focus-ring),inset 0 1px 0 #ffffff08;
}

:where(input,textarea)::placeholder{
  color:var(--ui-control-placeholder);
  opacity:1;
}

select{
  appearance:none;
  -webkit-appearance:none;
  padding-right:42px;
  background-image:linear-gradient(45deg,transparent 50%,#bca4e9 50%),linear-gradient(135deg,#bca4e9 50%,transparent 50%);
  background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;
  background-size:5px 5px,5px 5px;
  background-repeat:no-repeat;
  color-scheme:dark;
}

select option{
  background:#100d20;
  color:var(--ui-control-text);
}

textarea{
  min-height:116px;
  resize:vertical;
}

input[type="search"]{
  appearance:none;
  -webkit-appearance:none;
}

input[type="search"]::-webkit-search-cancel-button{
  filter:invert(1);
  opacity:.55;
}

input[type="checkbox"],input[type="radio"]{
  appearance:none;
  -webkit-appearance:none;
  width:18px;
  height:18px;
  min-width:18px;
  margin:0;
  border:1px solid var(--ui-control-border-hover);
  background:var(--ui-control-bg);
  display:inline-grid;
  place-content:center;
  vertical-align:-3px;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

input[type="checkbox"]{border-radius:5px}
input[type="radio"]{border-radius:50%}

input[type="checkbox"]::before,input[type="radio"]::before{
  content:"";
  width:10px;
  height:10px;
  transform:scale(0);
  transition:transform .15s ease;
  background:linear-gradient(135deg,var(--purple),var(--pink));
}

input[type="checkbox"]::before{
  clip-path:polygon(14% 44%,0 59%,40% 100%,100% 23%,84% 8%,39% 66%);
}

input[type="radio"]::before{border-radius:50%}
input[type="checkbox"]:checked::before,input[type="radio"]:checked::before{transform:scale(1)}

input[type="checkbox"]:focus-visible,input[type="radio"]:focus-visible{
  outline:none;
  border-color:var(--ui-focus);
  box-shadow:0 0 0 3px var(--ui-focus-ring);
}

input[type="file"]{
  width:100%;
  margin-top:6px;
  border:1px dashed var(--ui-control-border-hover);
  border-radius:var(--ui-radius);
  background:var(--ui-control-bg);
  color:var(--muted);
  padding:7px;
  font:inherit;
  font-size:12px;
}

input[type="file"]::file-selector-button{
  border:1px solid #8d4dff55;
  border-radius:8px;
  background:#8d4dff18;
  color:#dccbff;
  padding:8px 12px;
  margin-right:10px;
  font:inherit;
  font-weight:750;
  cursor:pointer;
}

input[type="file"]:hover::file-selector-button{background:#8d4dff2b;border-color:#9e6aff88}
input[type="file"]:focus-visible{outline:none;border-color:var(--ui-focus);box-shadow:0 0 0 3px var(--ui-focus-ring)}

:where(input,select,textarea):disabled{
  cursor:not-allowed;
  opacity:.62;
  color:var(--ui-disabled);
  background:#090817;
}

:where(input,select,textarea)[aria-invalid="true"],
:where(input,select,textarea).is-error{
  border-color:var(--ui-error);
  box-shadow:0 0 0 3px var(--ui-error-ring);
}

:where(input,select,textarea).is-success{
  border-color:var(--ui-success);
  box-shadow:0 0 0 3px var(--ui-success-ring);
}

.ui-help,.form-help{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.ui-error{display:block;margin-top:6px;color:#ff98aa;font-size:11px}
.ui-success{display:block;margin-top:6px;color:var(--ui-success);font-size:11px}

.contact-form label,.casino-directory label,.editor label{
  color:#b8b1ce;
  font-weight:650;
  letter-spacing:.01em;
}

.contact-form :where(input,select,textarea),
.casino-directory header form select{
  background-color:#0d0a20;
  border-color:#3a315f;
}

.media-admin-field{
  grid-column:1/-1;
  margin:6px 0 4px;
  padding:18px;
  border:1px solid var(--ui-border);
  border-radius:14px;
  background:linear-gradient(145deg,#141128,#0d0b1d);
}

.media-admin-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.media-admin-heading>span{color:#f5f1ff;font-size:13px;font-weight:800}
.media-storage{display:inline-flex;padding:5px 9px;border:1px solid #6d5b994f;border-radius:99px;color:#bcb4d1;font-size:10px;white-space:nowrap}
.media-storage-cloudinary{border-color:#7d63ff70;background:#6048ff18;color:#c7bdff}
.media-storage-local{border-color:#45f0ad55;background:#45f0ad10;color:#79f5bd}
.media-current,.media-new-preview{display:flex;align-items:center;gap:14px;min-width:0}
.media-current img,.media-new-preview img{width:96px;height:96px;flex:0 0 96px;object-fit:contain;border:1px solid #ffffff18;border-radius:12px;background:#080716}
.media-current>div:last-child,.media-new-preview>div{display:flex;min-width:0;flex-direction:column;gap:4px}
.media-current strong,.media-new-preview strong{color:#f5f1ff;font-size:12px}
.media-current small,.media-new-preview small,.media-new-preview span{overflow-wrap:anywhere;color:var(--muted);font-size:10px;line-height:1.45}
.media-empty{display:grid;width:96px;height:96px;flex:0 0 96px;place-items:center;border:1px dashed #705ba07a;border-radius:12px;background:#0b0919;color:#9f6fff;font-size:28px}
.media-replace-label{margin:17px 0 0!important}
.media-preserve-note{display:block;margin-top:7px;color:var(--muted);font-size:10px;line-height:1.45}
.media-new-preview{margin-top:14px;padding-top:14px;border-top:1px solid #ffffff0f}
.media-new-preview[hidden]{display:none}

@media(max-width:560px){
  .media-admin-field{padding:14px}
  .media-admin-heading{align-items:flex-start;flex-direction:column}
  .media-current img,.media-new-preview img,.media-empty{width:84px;height:84px;flex-basis:84px}
}

@media(prefers-reduced-motion:reduce){
  :where(input,select,textarea),input[type="checkbox"],input[type="radio"]{transition:none}
}
