/* 

screenart styling v0.9 | June 2025 
https://screenart.dev

*/

/* VARIABLES */

:root {
    --border-radius: 0.2rem;
}

/* GENERAL */

* {
    scrollbar-width:thin;
}

html {
    font-size: 10px;
    width: 100vw;
    height: 100vh;
    overflow:hidden;
}

body {
    height: 100%;
    width: 100%;
    font-size: 1.4rem;
    line-height: 1;
    font-weight: 300;
    color: #323232;
    
}

.sdev-form-element {
    outline: 0.1rem solid #ababab;
    position: relative;
}

.sdev-form-element:hover {
    outline-width:0.2rem;
}

.sdev-form-element.focus {
    outline-width:0.2rem;
    outline-color:#474747;
}

.sdev-form-element.disabled {
    pointer-events: none;
    opacity: 0.64;
    background-image: linear-gradient(45deg, #cfcfcf 25%, #c2c2c2 25%, #c2c2c2 50%, #cfcfcf 50%, #cfcfcf 75%, #c2c2c2 75%, #c2c2c2 100%);
    background-size: 1rem 1rem;
    cursor: default;
    background-repeat: repeat;
}

.sdev-form-element.disabled:hover {
    outline-width:0.1rem;
}

.sdev-form-header {
    position: absolute;
    top: -0.8rem;
    right: 0.4rem;
    display: flex;
    gap: 0.4rem;
    /* display: none; */
    z-index: 1;
}

.sdev-form-header .sdev-form-header-button {
    cursor: pointer;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0;
}

.sdev-form-element:hover .sdev-form-header-button {
    opacity:1;
}

.sdev-form-header img {
    filter: brightness(0);
    width: 1.6rem;
}

.sdev-form-history {
    pointer-events:all
}

.sdev-form-body {display: flex;flex-direction: row;align-items: center;height: 100%;}

/* container */

.sdev-form-container-horizontal {
    display:flex;
    flex-direction:row;
    gap: 0.8rem;
    max-width: 24rem;
    align-items: center;
}

.sdev-form-container-vertical {
    display:flex;
    flex-direction:column;
    gap:0.8rem;
}

/* POPUP */

.sdev-popup-container{
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(4px);
    padding: 2.4rem;
}

.sdev-popup-container.active{
    display: flex;
}

.sdev-popup {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    position: relative;
    border-radius: var(--border-radius);
    max-height: 100%;
    max-width: 100%;
    min-width: 28rem;
    width: 48rem;
}

.sdev-popup-header {
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items: center;
    padding: 1.2rem;
    padding-right: 0.8rem;
    gap: 0.8rem;
}

.sdev-popup-title {
    font-weight:600;
    font-size: 2rem;
    /* padding: 0.8rem; */
    /* padding-left: 1.6rem; */
}

.sdev-popup-body {
    padding:2.4rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sdev-popup-footer {
    display:flex;
    flex-direction:row;
    justify-content:center;
    padding:2.4rem;
    padding-top: 0.8rem;
}

/* FIELD */
.sdev-form-field{
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    min-width: 8rem;
    max-width: 24rem;
    width: 100%;
    background-color: #fff;
}

.sdev-form-label-container{
    height: 100%;
    top:0;
    left: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: absolute;
    transition: all 120ms cubic-bezier(.31,.16,.08,1);
    pointer-events: none;
}

.sdev-form-field.active .sdev-form-label-container{
    height:0;
}

.sdev-form-label{
    transition: all 120ms ease-in-out;
    border-radius: 0.2rem;
}

.sdev-form-field.active .sdev-form-label {
    background-color:#fff;
    padding: 0.2rem;
    font-size:80%;
}

.sdev-form-input-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* gap: 0.4rem; */
    padding: 0 1.2rem;
    /* overflow-x: scroll; */
    /* scrollbar-width: none; */
    width: 100%;
}

.sdev-form-prefix, .sdev-form-suffix {
    pointer-events: none;
    opacity:0;
}

.sdev-form-field.active .sdev-form-prefix,
.sdev-form-field.active .sdev-form-suffix
{
    opacity:1;
}

.sdev-form-field[data-disabled="true"] .sdev-form-label span {
    background-color: #dcdcdc;
}

.sdev-form-field.active .sdev-form-label span{
    font-size:80%;
}

.sdev-form-input{
    height: 3.6rem;
    line-height: 3.6rem;
    border: none;
    outline: none;
    padding: 0;
    width: 100%;
    background-color: transparent;
    /* padding: 0 1.2rem; */
}


.sdev-form-visibility {
    filter: brightness(0.4);
    cursor: pointer;
}

.sdev-form-visibility img{
    width:2rem;
}

/* SSSSSEARCH */

.sdev-form-search {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    width: 100%;
    min-width: 8rem;
    max-width:24rem;
}

.sdev-form-search  .sdev-form-input-container {
        overflow-x: scroll; 
 scrollbar-width: none;
}

.sdev-form-search-clear {
    /* filter:brightness(0); */
    /* cursor: pointer; */
    /* flex-shrink: 0; */
    /* display: none; */
}

.sdev-form-search-clear img{
    /* width:2rem; */
    /* filter: brightness(0.6); */
}

.sdev-form-search-tag-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    /* gap: 0.4rem; */
    flex-shrink: 0;
    /* padding-right: 0.4rem; */
}

.sdev-form-search-tag {
    display: flex;
    flex-direction: row;
    justify-content: center;
    background-color: #e2e2e2;
    padding: 0.2rem;
    border-radius: 0.2rem;
    align-items: center;
    margin-right: 0.4rem;
}

.sdev-form-search-tag.selected {
    background-color: #f6d4d4;
}

.sdev-form-search-tag-remove{
    /* cursor: pointer; */
}

.sdev-form-search-tag-remove svg{
    color:#323232;
    width: 2rem;
}

.sdev-form-search-tag-remove:hover svg{
    color:#e27272;
}

.sdev-form-search-tag.selected svg{
    color:#e27272;
}

/* CHECKBOX */

.sdev-form-checkbox {
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sdev-form-checkbox-check-container {
    width: 74%;
    height: 74%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 50%;
    outline: 0.2rem solid #cecece;
    /* outline-offset: -0.1rem; */
}

.sdev-form-checkbox-check {
    width: 68%;
    height: 68%;
    border-radius: 50%;
}

.sdev-form-checkbox.active .sdev-form-checkbox-check {
    background-color: #72beee;
}

   

.sdev-form-checkbox-active{
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sdev-form-checkbox-inactive{
    position:absolute;
    width:100%;
    height:100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sdev-form-checkbox[data-checked="false"] .sdev-form-checkbox-active{
    visibility:hidden;
}

.sdev-form-checkbox[data-checked="true"] .sdev-form-checkbox-inactive{
    visibility:hidden;
}



/* DROPDOWN */
.sdev-form-dropdown {
    position: relative;
    height: 3.6rem;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    min-width: 8rem;
    max-width: 24rem;
    width: 100%;
    background-color: #fff;
    cursor: pointer;
}

.sdev-form-dropdown .sdev-form-label-container {
    height:0;
}

.sdev-form-dropdown .sdev-form-label {
    background-color:#fff;
    padding:0.2rem;
    font-size: 80%;
}

.sdev-form-value {
    line-height: 3.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1.2rem;
    pointer-events: all;
    white-space: nowrap;
}

.sdev-form-footer {
    display:none;
    flex-direction:column;
    z-index: 10;
    background-color: #fff;
    border-radius: var(--border-radius);
    z-index: 999;
    box-shadow: -3px 2px 24px -4px rgba(0, 0, 0, 0.24);
}

.sdev-form-footer.active {
    display:flex;
}

.sdev-form-footer .sdev-form-input {
    border-bottom:0.1rem solid #323232;
}

.sdev-form-dropdown-list {
    display: flex;
    flex-direction:column;
    max-height: 24rem;
    overflow-y: auto;
    scrollbar-width: none;
}

.sdev-form-dropdown-list-item {
    cursor: pointer;
    padding: 0 1.2rem;
    height: 3.6rem;
    line-height: 3.6rem;
    max-width: 32rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sdev-form-dropdown-list-item:hover {
    background-color: #edf5fb;
}

.sdev-form-dropdown-list-item.active {
    background-color: #d4e9f7;
}

.sdev-form-dropdown-list-item.hidden {
    display: none;
}

/* toggle */

.sdev-form-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    cursor:pointer;
    white-space: nowrap;
    position: relative;
    outline:none;
    margin-bottom: 0.2rem;
    align-items: start;
}

.sdev-form-toggle.disabled {
    background-image:none;
}

.sdev-form-toggle .sdev-form-header {
    left: 0;
    right: auto;
    top: -1.6rem;
}

.sdev-form-toggle .sdev-form-body {
    flex-direction:column;
    align-items: start;
    gap: 0.2rem;
}

.sdev-form-toggle-label {
    font-size:80%;
    padding-left:0.2rem;
}

.sdev-form-toggle-slider-container {
    border-radius:999px;
    background-color: #e0e0e0;
    width: 4.2rem;
    height: 2rem;
    display:flex;
    flex-direction:row;
    align-items: center;
    outline: 0.1rem solid #cecece;
}

.sdev-form-toggle.disabled .sdev-form-toggle-slider-container{
    background-image: linear-gradient(45deg, #cfcfcf 25%, #c2c2c2 25%, #c2c2c2 50%, #cfcfcf 50%, #cfcfcf 75%, #c2c2c2 75%, #c2c2c2 100%);
    background-size: 1rem 1rem;
}

.sdev-form-toggle-slider {
    background-color: #72beee;
    border-radius:999px;
    width: 2.2rem;
    transition: width 140ms cubic-bezier(0.250, 0.235, 0.200, 0.975);
    display:flex;
    justify-content:end;
}

.sdev-form-toggle.active .sdev-form-toggle-slider {
    width:4.2rem;
}

.sdev-form-toggle-slider-handle {
    width: 2.2rem;
    height: 2.2rem;
    background-color: #474747;
    border-radius:999px;
    /* transition: all 120ms ease-in-out; */
    display:flex;
    justify-content:center;
    align-items: center;
    z-index: 2;
}


.sdev-form-toggle-slider-handle img {
    width:1.6rem;
}

/* RADIO */

.sdev-form-radio {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.2rem;
    cursor:pointer;
    white-space: nowrap;
    outline:none;
    margin-bottom: 0.2rem;
}


.sdev-form-radio-label {
    font-size:80%;
    padding-left:0.2rem;
}

.sdev-form-radio-slider-container {
    border-radius:999px;
    background-color: #d4d4d4;
    width: 8.2rem;
    display:flex;
    height: 2rem;
    flex-direction:row;
    align-items: center;
    transition: all 120ms ease-in-out;
    position: relative;
    background-color: #72beee;
}

.sdev-form-radio.disabled .sdev-form-radio-slider-container{
    background-image: linear-gradient(45deg, #cfcfcf 25%, #c2c2c2 25%, #c2c2c2 50%, #cfcfcf 50%, #cfcfcf 75%, #c2c2c2 75%, #c2c2c2 100%);
    background-size: 1rem 1rem;
}

.sdev-form-radio-state-container {
    position:absolute;
    width:100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    left: 0;
    /* top: 0; */
    justify-content: space-between;
    align-items: center;
    /* padding: 0 0.2rem; */
}

.sdev-form-radio-state {
    width: 2.2rem;
    height: 2.2rem;
    background-color: #e0e0e0;
    /* opacity: 0.4; */
    border-radius:999px;
    /* transition: all 120ms ease-in-out; */
    /* position: relative; */
    display:flex;
    justify-content:center;
    align-items: center;
    outline: 0.1rem solid #cecece;
    outline-offset: -0.1rem;
}




.sdev-form-radio-slider {
    width: 2.2rem;
    height: 2.2rem;
    background-color: #474747;
    border-radius:999px;
    transition: transform 140ms ease-in-out;
    /* position: relative; */
    display:flex;
    justify-content:center;
    align-items: center;
    position: relative;
}

.sdev-form-radio[data-state="1"] .sdev-form-radio-slider {
    transform:translateX(0);
}

.sdev-form-radio[data-state="2"] .sdev-form-radio-slider {
    transform:translateX(3rem);
}

.sdev-form-radio[data-state="3"] .sdev-form-radio-slider {
    transform:translateX(6rem);
}

.sdev-form-toggle-slider img {
    width:1.6rem;
    /* filter: brightness(0); */
}


/* BUTTONS */

.sdev-form-button {
    line-height:3.6rem;
    height:3.6rem;
    background-color:#000;
    color:#fff;
    font-weight:600;
    padding:0 1.2rem;
    border-radius: var(--border-radius);
    cursor:pointer;
}

.sdev-form-button-square {
    cursor:pointer;
    padding: 0 0.8rem;
    height: 3.6rem;
    display:flex;
    align-items: center;
    background-color: #72beee;
    border-radius: var(--border-radius);
    justify-content: start;
    transition: background-color 140ms cubic-bezier(0.250, 0.235, 0.200, 0.975);
    flex-shrink: 0;
    flex-grow: 0;
    gap: 0.4rem;
    outline: none;
    width: max-content;
    user-select: none;
}

.sdev-form-button-square:hover {
    
}

.sdev-form-button-square.disabled {
    opacity:1;
}

.sdev-form-button-square img {
    width: 2rem;
    height: 2rem;
}

.sdev-form-button-square span{
    
}

.sdev-form-button-default {
    cursor:pointer;
    width:3.6rem;
    height:3.6rem;
    display:flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
    opacity:0.7;
    transition:all 120ms ease-in-out;
    flex-shrink: 0;
}

.sdev-form-button-default:hover {
    opacity:1;
    background-color: #0000001a;
}

.sdev-form-button-default img {
    width:2.4rem;
    height:2.4rem;
    filter:brightness(0);
}

.sdev-form-button-mini {
    cursor:pointer;
    width: 2rem;
    height: 2rem;
    display:flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    opacity: 0.64;
    transition:all 120ms ease-in-out;
    flex-shrink: 0;
}

.sdev-form-button-mini:hover {
    opacity:1;
    background-color: #e7e7e7;
}

.sdev-form-button-mini img {
    width: 1.8rem;
    height: 1.8rem;
}

/* image upload */
.sdev-form-image-upload {
    width: 9.6rem;
    height: 9.6rem;
    position: relative;
    /* overflow: hidden; */
    border-radius: var(--border-radius);
    background-image: url(./assets/img/image_48dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    min-width: 9.6rem;
    max-width: 0.6rem;
    background-color: #fff;
}

.sdev-form-image-upload .sdev-form-body img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sdev-form-image-upload label {
    cursor: pointer;
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0;
    background-image: url(../assets/img/upload_24dp_FILL0_wght400_GRAD0_opsz24.svg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 50% 50%;
    left: 0;
    top: 0;
    transition: all 120ms ease-in-out;
}

.sdev-form-image-upload:hover label {
    opacity: 0.8;
    background-color: #00000080;
    backdrop-filter: blur(4px);
}

.sdev-form-image-upload input {
    display:none;
}

/* editor */

.sdev-form-editor {
    display:flex;
    flex-direction: column;
    position: relative;
    max-width: 48rem;
    width: 100%;
    border-radius: var(--border-radius);
    background-color: #fff;
}

.sdev-form-editor .sdev-form-label-container {
    height:0;
    left: 1.2rem;
}

.sdev-form-editor .sdev-form-label {
    background-color: #fff;
    padding: 0.2rem;
    font-size:80%;
}
.sdev-form-editor .rich-content-editor {
    display:flex;
    flex-direction:column;
}

.sdev-form-editor .sdev-form-body {
    padding:0;
}

.sdev-form-editor .ql-toolbar.ql-snow {
    border: none;
    border-bottom: 0.1rem solid #d4d4d4;
    padding: 0.4rem;
}

.sdev-form-editor .ql-toolbar.ql-snow + .ql-container.ql-snow {
    border:none;
    font-family: inherit;
}

.sdev-form-editor .ql-container{
    font-size:inherit;
}

.sdev-form-editor .ql-editor{
    min-height: 6.4rem;
    padding: 1.2rem;
}


/* date */

.sdev-form-date {
    position:relative;
    position: relative;
    /* height: 4rem; */
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    min-width: 8rem;
    max-width: 24rem;
    cursor: pointer;
    width: 100%;
    background-color: #fff;
}

.sdev-form-date .sdev-form-input{
    opacity:0;
    pointer-events:none;
    cursor: pointer;
}

.sdev-form-date.active .sdev-form-input{
    opacity:1;
    pointer-events:auto;
}

.sdev-form-date.active .sdev-form-label-container {
    height: 0;
}

.sdev-form-date.active .sdev-form-label{
    background-color: #fff;
    padding: 0.2rem;
    font-size: 80%;
}