/* ============ *
 * ## Button ##
 * ============ */

.ui-button {
   cursor: pointer;
   display: flex;
   flex-direction: row;
   height: 22px;
   gap: 10px;
   padding: 0 10px;
   user-select: none;
   white-space: nowrap;
}
.ui-button[disabled] {
   cursor: default;
   pointer-events: none;
}

.ui-button .icon,
.ui-button .label {
   pointer-events: none;
}

.ui-button .icon {
   float: left;
   height: 100%;
   position: relative;
   width: 12px;
}

.ui-button .icon svg {
   float: left;
   height: 100%;
   position: relative;
   width: 100%;
}

.ui-button .label {
   float: left;
   font-size: 13px;
   line-height: 22px;
   position: relative;
   text-align: center;
   text-transform: uppercase;
}

.ui-button[disabled] .icon,
.ui-button[disabled] .label {
   opacity: .5;
}


/* =================== *
 * ## Popup Overlay ##
 * =================== */

.ui-popup-overlay {
   height: 100vh;
   left: 0;
   pointer-events: none;
   position: fixed;
   top: 0;
   width: 100vw;
   z-index: 9999;
}

.ui-popup-overlay .mouse-blocker {
   background: rgba(0,0,0,.33);
   float: left;
   height: 100%;
   opacity: 0;
   position: relative;
   width: 100%;
   z-index: 0;

   transition: opacity .25s;
}

.ui-popup-overlay.active { pointer-events: all; }
.ui-popup-overlay.active .mouse-blocker { opacity: 1; }


/* =========== *
 * ## Popup ##
 * =========== */

.ui-popup {
   background: var(--white);
   box-shadow: 0px 1px 5px 1px rgb(0 0 0 / 25%);
   display: flex;
   flex-direction: column;
   gap: 10px;
   left: 50%;
   max-width: 20vw;
   position: absolute;
   top: 50%;
}

.ui-popup .role-header,
.ui-popup .role-content,
.ui-popup .role-buttons {
   padding: 0 10px;
}

.ui-popup .role-header {
   border-style: solid;
   border-width: 0 0 1px 0;
   height: 28px;
   line-height: 27px;
   text-align: center;
   z-index: 2;

   border-color: var(--grey-light);
}

.ui-popup .role-content {
   display: flex;
   flex-direction: column;
   font-size: 14px;
   gap: 10px;
   line-height: 22px;
   max-height: 50vh;
   overflow: visible auto;
   padding-top: 10px;
   z-index: 1;
}

.ui-popup .role-content .form-constant {
   line-height: 22px;
   white-space: nowrap;
}

.ui-popup .role-header + .role-content { padding-top: 0; }

.ui-popup .role-buttons {
   border-style: solid;
   border-width: 1px 0 0 0;
   display: flex;
   gap: 10px;
   justify-content: space-between;
   padding: 9px 10px 10px 10px;
   z-index: 0;

   border-color: var(--grey-light);;
}
.ui-popup .role-buttons[num="1"] { justify-content: space-around }


/* ========= *
 * ## Row ##
 * ========= */

.ui-row {
   display: flex;
   flex-direction: row;
   font-size: 11px;
   gap: 10px;
}

.ui-row > .label {
   font-weight: bold;
   height: 22px;
   line-height: 22px;
   white-space: nowrap;
}

.ui-row > .value {
   align-items: flex-start;
   display: flex;
   flex-direction: column;
   min-width: 100px;
}


/* ==================== *
 * ## UI Info Button ##
 * ==================== */

.ui-info-button { cursor: pointer; }

.ui-info-button[type='icon'] .icon,
.ui-info-button[type='icon'] .icon svg {
   float: left;
   height: 100%;
   position: relative;
   width: 100%;
}

.ui-info-button[type='icon'] .icon svg { overflow: visible; }

