.modal-backdrop {
position: fixed;
inset: 0;
display: none;
align-items: flex-start;
justify-content: center;
background: #000;
z-index: var(--z-modal);
padding: 20px;
-webkit-tap-highlight-color: transparent;
}
.modal-backdrop.active {
display: flex;
}
.modal-window {
width: 780px;
max-width: calc(100% - 40px);
background: #181c1f;
color: #eeeeee;
border-radius: var(--radius);
overflow: hidden;
display: flex;
flex-direction: column;
max-height: calc(100vh - 4vh);
border: 1px solid var(--border);
transform: translateY(-8px);
opacity: 0;
transition: transform var(--transition-speed),
opacity var(--transition-speed);
margin-top: 2vh;
}
.modal-backdrop.active .modal-window {
transform: translateY(0);
opacity: 1;
}
.modal-header {
padding: 14px 18px;
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--gap);
}
.modal-title {
margin: 0;
font-size: 1.05rem;
font-weight: 700;
color: #eeeeee;
line-height: 1;
}
.modal-close {
background: transparent;
border: none;
color: var(--blueink);
font-size: 18px;
padding: 6px;
cursor: pointer;
border-radius: 8px;
}
.modal-close:focus {
outline: none;
box-shadow: 0 0 0 var(--focus-ring) rgba(102, 126, 234, 0.12);
}
.modal-body {
padding: 16px 18px;
overflow: auto;
display: flex;
flex-direction: column;
gap: 12px;
color: #eeeeee;
font-size: 14px;
}
.modal-row {
display: flex;
gap: 10px;
align-items: center;
flex-wrap: nowrap;
justify-content: center;
}
.modal-row[data-position="left"] {
justify-content: flex-start;
}
.modal-row[data-position="right"] {
justify-content: flex-end;
}
.modal-row .modal-element {
flex: 1 1 auto;
min-width: 110px;
}
.modal-label {
display: block;
font-size: 13px;
color: var(--blueink);
}
.modal-message {
color: #eeeeee;
background: transparent;
padding: 2px 0;
font-size: 14px;
}
.modal-input,
.modal-select,
.modal-textarea,
.custom-dropdown-trigger {
width: 100%;
padding: 10px 12px;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--modalinput);
color: #eeeeee;
font-size: 14px;
box-sizing: border-box;
outline: none;
font-family: "Source Code Pro", monospace;
transition: box-shadow var(--transition-speed),
transform var(--transition-speed), background var(--transition-speed);
margin-top:8px  
}
.modal-input::placeholder,
.modal-textarea::placeholder {
color: rgba(230, 238, 248, 0.32);
}
.modal-input:focus:not([type="checkbox"]):not([type="radio"]),
.modal-select:focus,
.modal-textarea:focus,
.custom-dropdown-trigger:focus {
  box-shadow: 0 0 0 var(--focus-ring) rgba(100, 116, 255, 0.08);
  border-color: rgba(100, 116, 255, 0.18);
  transform: translateY(-1px);
  background: #000;
}
.modal-textarea {
min-height: 84px;
resize: vertical;
}
.modal-btn,
.modal-inline-button,
.modal-action {
padding: 8px 12px;
border-radius: 56px;
border: 1px solid transparent;
cursor: pointer;
font-size: 14px;
transition: transform var(--transition-speed),
box-shadow var(--transition-speed);
background: #272727;
color: #cacaca;
}
.modal-btn:focus {
outline: none;
box-shadow: 0 0 0 var(--focus-ring) #999999;
}
.modal-btn:hover {
transform: translateY(-1px);
}
.modal-footer {
padding: 12px 16px;
border-top: 1px solid rgba(255, 255, 255, 0.03);
display: flex;
gap: 10px;
justify-content: flex-end;
flex-wrap: wrap;
}
.hidden {
display: none !important;
}
.small {
font-size: 13px;
}
.center {
text-align: center;
}
.modal-btn.active {
background: var(--accent2);
color: #cacaca;
outline: none;
box-shadow: 0 0 0 var(--focus-ring) #999999;
}
.modal-input[type="checkbox"],
.modal-input[type="radio"] {
appearance: none;
-webkit-appearance: none;
width: 18px;
height: 18px;
margin: 0;
cursor: pointer;
position: relative;
display: inline-block;
vertical-align: middle;
border: none;
background: transparent;
outline: none;
}
.modal-input[type="checkbox"]::before {
content: "";
position: absolute;
top: 0;
left: 0;
 width: 18px;
height: 18px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path d="M 1 9 L 1 9 c 0 -5 3 -8 8 -8 L 9 1 C 14 1 17 5 17 9 L 17 9 c 0 4 -4 8 -8 8 L 9 17 C 5 17 1 14 1 9 L 1 9 Z" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="60" stroke-dashoffset="0"/></svg>');
background-size: contain;
background-repeat: no-repeat;
transition: all var(--transition-speed);
}
.modal-input[type="checkbox"]:checked::before {
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path d="M 1 9 L 1 9 c 0 -5 3 -8 8 -8 L 9 1 C 14 1 17 5 17 9 L 17 9 c 0 4 -4 8 -8 8 L 9 17 C 5 17 1 14 1 9 L 1 9 Z" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="60" stroke-dashoffset="60"/><polyline points="1 9 7 14 15 4" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="22" stroke-dashoffset="42"/></svg>');
animation: checkboxCheck 0.5s ease forwards;
}
.modal-input[type="radio"]::before {
content: "";
position: absolute;
top: 0;
left: 0;
 width: 18px;
height: 18px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="8" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-dasharray="50.27" stroke-dashoffset="0"/></svg>');
background-size: contain;
background-repeat: no-repeat;
transition: all var(--transition-speed);
}
.modal-input[type="radio"]:checked::before {
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="8" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-dasharray="50.27" stroke-dashoffset="0"/><circle cx="9" cy="9" r="4" fill="%23c8ccd4"/></svg>');
animation: radioCheck 0.3s ease forwards;
}
@keyframes checkboxCheck {
0% {
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path d="M 1 9 L 1 9 c 0 -5 3 -8 8 -8 L 9 1 C 14 1 17 5 17 9 L 17 9 c 0 4 -4 8 -8 8 L 9 17 C 5 17 1 14 1 9 L 1 9 Z" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="60" stroke-dashoffset="0"/><polyline points="1 9 7 14 15 4" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="22" stroke-dashoffset="66"/></svg>');
}
100% {
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path d="M 1 9 L 1 9 c 0 -5 3 -8 8 -8 L 9 1 C 14 1 17 5 17 9 L 17 9 c 0 4 -4 8 -8 8 L 9 17 C 5 17 1 14 1 9 L 1 9 Z" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="60" stroke-dashoffset="60"/><polyline points="1 9 7 14 15 4" fill="none" stroke="%23c8ccd4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="22" stroke-dashoffset="42"/></svg>');
}
}
@keyframes radioCheck {
0% {
transform: scale(0.8);
opacity: 0.8;
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
opacity: 1;
}
}
@media (max-width: 560px) {
.modal-window {
width: 100%;
max-width: 100%;
border-radius: 8px;
padding: 0;
}
.modal-body {
padding: 12px;
}
.modal-header {
padding: 10px 12px;
}
.modal-footer {
padding: 10px;
}
}

.custom-dropdown {
 position: relative;
 width: 100%;
}
.custom-dropdown-trigger {
 position: relative;
 padding-right: 40px;
 cursor: pointer;
 display: flex;
 align-items: center;
}
.custom-dropdown-trigger::after {
 content: 'expand_more';
 font-family: 'Material Symbols Rounded' !important;
 position: absolute;
 right: 12px;
 top: 50%;
 transform: translateY(-50%) rotate(0deg);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 font-size: 22px;
 color: var(--blueink);
 pointer-events: none;
 transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 font-feature-settings: "liga";
 -webkit-font-smoothing: antialiased;
 text-rendering: optimizeLegibility;
}
.custom-dropdown-trigger[aria-expanded="true"]::after {
 transform: translateY(-50%) rotate(180deg);
}
.custom-dropdown-portal-menu {
 position: fixed;
 background: #171717;
 border: 1px solid var(--border);
 border-radius: 12px;
 box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
 overflow: hidden;
 z-index: 100001;
 opacity: 0;
 transform: scale(0.96) translateY(-10px);
 transition: all 0.23s cubic-bezier(0.4, 0, 0.2, 1);
 visibility: hidden;
 display: flex;
 flex-direction: column;
}
.custom-dropdown-portal-menu.active {
 opacity: 1;
 transform: scale(1) translateY(0);
 visibility: visible;
}
.dropdown-search {
 padding: 10px;
 background: #171717;
 border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.search-wrapper {
 position: relative;
 display: flex;
 align-items: center;
}
.search-input {
 width: 100%;
 box-sizing: border-box;
 padding: 8px 12px 8px 38px;
 background: #272727;
 border: 1px solid var(--border);
 border-radius: 20px;
 color: #eeeeee;
 font-size: 13px;
 outline: none;
 font-family: inherit;
}
.search-input:focus {
 border-color: rgba(100, 116, 255, 0.5);
}
.search-icon {
 position: absolute;
 left: 12px;
 font-size: 18px;
 color: var(--blueink);
 pointer-events: none;
}
.options-list {
 padding: 6px;
 overflow-y: auto;
 max-height: calc(38px * 6);
}
.options-list::-webkit-scrollbar {
 width: 4px;
}
.options-list::-webkit-scrollbar-thumb {
 background: var(--border);
 border-radius: 10px;
}
.custom-dropdown-option {
 padding: 10px 14px;
 font-size: 14px;
 cursor: pointer;
 border-radius: 6px;
 margin: 1px 0;
 transition: background 0.2s ease;
 color: #eeeeee;
}
.custom-dropdown-option:hover {
 background: rgba(255, 255, 255, 0.05);
}
.custom-dropdown-option[aria-selected="true"] {
 background: rgba(100, 116, 255, 0.1);
 color: #ffffff;
}
.no-results {
 padding: 20px;
 text-align: center;
 color: var(--blueink);
 font-size: 13px;
}
.modal-element {
  display: flex;  /* Change from column to row */
  flex-direction: row;  /* Aligns label and input side-by-side */
  align-items: center;  /* Vertically centers them */
  gap: 8px;  /* Adds space between label and checkbox */
  margin-bottom: 4px;
}

.modal-label {
  display: inline;  /* Or inline-block; removes block behavior and margin-bottom */
  font-size: 13px;
  color: var(--blueink);
  margin-bottom: 0;  /* Remove vertical margin */
  font-weight: 500;
  order: 2;  /* Optional: Puts text after checkbox if desired */
}
