/* Input File */
/* file upload button */
input[type="file"] {
    width: 100%;
}
input[type="file"]::file-selector-button {
    border-radius: 4px;
    padding: 0 12px;
    height: 35px;
    cursor: pointer;
    box-sizing: border-box;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.16);
    box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05);
    margin-right: 16px;
    transition: background-color 200ms;
}
  
/* file upload button hover state */
input[type="file"]::file-selector-button:hover {
    background-color: var(--color-soft--);
    border-color: var(--color-accent--);
    color: var(--color-primary--);
}
  
/* file upload button active state */
input[type="file"]::file-selector-button:active {
    background-color: var(--color-soft--);
    border-color: var(--color-accent--);
    color: var(--color-primary--);
}

/* End Input File */

/* Custom Color picker */
.custom-color-input {
    position: relative;
    width: 104px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 5px 12px;
    padding-left: 28px;
}
  
.custom-color-input input[type="color"] {
    position: absolute;
    width: 17px;
    height: 17px;
    border: none;
    cursor: pointer;
    background: none;
    padding: 0;
    left: 5px;
}
  
.custom-color-input input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
  
.custom-color-input input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}
  
.custom-color-input input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}
  
.custom-color-input .hex-value {
    font-size: 14px;
    font-weight: 400;
}
  
/* End Custom Color picker */

/* Select */
select {
    appearance: none;
    -webkit-appearance: none;
    /* Safari, Chrome */
    -moz-appearance: none;
    /* Firefox */
    height: 100%;
    width: 100%;
    border: none;
    padding-top: 8px;
    padding-right: 12px;
    padding-bottom: 8px;
    padding-left: 12px;
    border-width: 1px;
    background-color: var(--color-grays-white--);
    color: var(--color-text--);
    cursor: pointer;
    box-sizing: border-box;
    min-height: 35px;
}

select:focus,
select:hover {
    outline: none;
    box-shadow: 0 0 0 1px var(--color-accent--);
    color: var(--color-primary--);
}

select:valid {
    color: var(--color-primary--);
}

select option {
    border-radius: 6px;
}

select:has(option[value=""]:checked) {
    color: var(--color-text--);
}

/* End Select */

/* Searcable select */

.searchable-wrapper {
    position: relative !important;
    overflow: unset !important;
    border: none !important;
}

.searchable-wrapper .select-input {
    border-radius: 6px;
    border: 1px solid var(--color-border--);
}

.searchable-wrapper .select-input:focus,
.searchable-wrapper .select-input:hover {
    border-color: var(--color-accent--);
    color: var(--color-primary--);
}

.select-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-grays-white--);
    border: 1px solid var(--color-border--);
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.select-option {
    padding: 8px 12px;
    cursor: pointer;
}

.select-option.active {
    background-color: var(--color-accent--);
    color: var(--color-grays-white--);
}

.select-option:hover {
    background-color: var(--color-accent--);
    color: var(--color-grays-white--);
}

/* End seearchable */

/* Start Date */
input[type="date"] {
    appearance: none;
    font-family: "Inter", sans-serif;
    -webkit-appearance: none;
    /* Safari, Chrome */
    -moz-appearance: textfield;
    /* Firefox */
}

input[type=date] {
    appearance: none;
    -webkit-appearance: none;
    /* Safari, Chrome */
    -moz-appearance: none;
    /* Firefox */
    width: 100%;
    height: 35px;
    border: none;
    padding-top: 8px;
    padding-right: 12px;
    padding-bottom: 8px;
    padding-left: 12px;
    border-width: 1px;
    background-color: var(--color-grays-white--);
    color: var(--color-text--);
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
}

input[type=date]:focus,
input[type=date]:hover {
    outline: none;
}

input[type=date].filled {
    color: var(--color-primary--);
}

/* End Date */

/* input in table */

table tr td input[type="text"],
table tr td input[type="number"],
table tr td input[type="password"],
table tr td input[type="email"],
table tr td textarea,
table tr td select {
    padding: 5px 9px;
    height: 28px;
    min-height: unset;
}

/* End input in table */

/* Input Text */
input[type="text"],
input[type="number"],
input[type="password"],
input[type=email],
textarea {
    appearance: none;
    -webkit-appearance: none;
    /* Safari, Chrome */
    -moz-appearance: none;
    /* Firefox */
    width: 100%;
    border: none;
    padding: 8px 12px;
    border: 1px solid transparent;
    background-color: var(--color-grays-white--);
    color: var(--color-primary--);
    cursor: auto;
    box-sizing: border-box;
    height: 35px;
    font-family: var(--font-family--) !important;
}

input[type=text]:hover,
input[type=text]:focus,
input[type=number]:hover,
input[type=number]:focus,
input[type=password]:hover,
input[type=password]:focus,
input[type=email]:hover,
input[type=email]:focus,
textarea:hover,
textarea:focus {
    color: var(--color-primary--);
    outline: none;
}
/* placeholder */
input[type=text]::placeholder,
input[type=text]::placeholder,
input[type=number]::placeholder,
input[type=password]::placeholder,
input[type=email]::placeholder,
textarea::placeholder {
    color: var(--color-text--);
    outline: none;
    font-family: var(--font-family--);
}
input[type=text]:hover::placeholder,
input[type=text]:focus::placeholder,
input[type=number]:hover::placeholder,
input[type=number]:focus::placeholder,
input[type=password]:hover::placeholder,
input[type=password]:focus::placeholder,
input[type=email]:hover::placeholder,
input[type=email]:focus::placeholder,
textarea:hover::placeholder,
textarea:focus::placeholder {
    outline: none;
    color: var(--color-primary--);
}

input[type=text]:disabled,
input[type=number]:disabled,
input[type=password]:disabled,
input[type=email]:disabled,
textarea:disabled {
    border: 1px solid #DDE0E6;
    background-color: #F5F5F5;
    color: #999DA5;
    cursor: not-allowed;
}

/* Start Chekbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--color-grays-white--);
    border: 1px solid var(--color-border--);
    border-radius: 4px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    box-sizing: border-box;
}

input[type="checkbox"]:hover {
    background-color: var(--color-soft--);
    border: 1px solid var(--color-accent--);
}

input[type="checkbox"]:checked {
    border: none;
}

input[type="checkbox"]:checked::after {
    display: inline-block;
    content: "";
    position: absolute;
    top: -0.5px;
    left: -0.5px;
    background-image: url("../icons/accent-blue/checklist-blue.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 60%;
    background-color: var(--color-soft--);
    border: 1px solid var(--color-accent--);
    color: var(--color-accent--);
    right: 0;
    font-size: 12px;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border-radius: 4px;
    overflow: hidden;
}

input[type="checkbox"].solid:checked::after {
    background-image: url("../icons/checklist-white.svg");
    background-color: var(--color-accent--);
    border: 1px solid var(--color-accent--);
    color: var(--color-accent--);
}

/* End Checkbox */

/* Upload Image Box */ 
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.upload-box {
    /* margin: 0 8px;
    margin-bottom: 10px; */
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d0d5dd;
    border-radius: 6px;
    padding: 17px 24px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    background: #fafafa;
    color: rgba(89, 89, 89, 1);
}

.upload-content:hover,
.upload-box.dragging .upload-content {
    border-color: var(--color-accent--);
    background: #f5f7ff;
}

.upload-content.loading {
    opacity: 0.6;
    pointer-events: none;
}

.upload-image-container {
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 1);
    color: var(--color-accent--);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 6px;
    border: 1px solid rgba(234, 236, 240, 1);
}

.upload-image-container.loading img {
    animation: spin 1s linear infinite;
}

.upload-image-container .upload-image {
    display: none;
    width: 100%;
    max-width: 320px;
    min-height: 0;
    border-radius: 8px;
    background-repeat: no-repeat;
}

.upload-image-container .upload-image.has-image {
    display: block;
}

.upload-text {
    font-size: 14px;
    margin-bottom: 4px;
}

.upload-text span {
    color: var(--color-accent--);
    font-weight: 600;
}

.upload-content small {
    font-size: 12px;
}

/* End Upload Image Box */

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch input:checked+.slider {
    background-color: var(--color-accent--);
}

.switch input:checked+.slider::before {
    transform: translateX(16px);
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    /* top: 0; left: 0; right: 0; bottom: 0 */
    background-color: var(--toggle-off--);
    border-radius: 30px;
    transition: 0.3s;
}

.switch .slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: var(--color-grays-white--);
    border-radius: 50%;
    transition: 0.3s;
}

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

input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

/* Radio button */

.radio-wrapper input[type="radio"] {
    display: none;
}

.radio-wrapper {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    width: fit-content;
}

.custom-radio {
    width: 14px;
    height: 14px;
    border: 1px solid var(--color-border--);
    border-radius: 50%;
    position: relative;
    transition: border-color 0.2s ease;
}

.radio-wrapper input[type="radio"]:checked+.custom-radio::after {
    content: "";
    width: 6px;
    height: 6px;
    background-color: var(--color-accent--);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-wrapper input[type="radio"]:checked+.custom-radio,
.radio-wrapper:hover .custom-radio {
    background-color: var(--color-soft--);
    border-color: var(--color-accent--);
}

/* End Radio button */

/* Toggle Group */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Adjust spacing as needed */
}

.toggle-label {
    font-size: 14px;
    color: var(--color-blue-gray-300--);
    /* Default inactive color */
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}


/* Input Wrapper */
.input-wrapper {
    box-sizing: border-box;
    height: inherit;
    position: relative;
    border: 1px solid var(--color-border--);
    background-color: var(--color-grays-white--);
    border-radius: 6px;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: all 0.15s ease;
}

.input-wrapper.with-shadow {
    box-shadow: 0px 2px 3px 0px #0000000D;
}

.input-wrapper:focus-within:not(:has(input:disabled)),
.input-wrapper:hover:not(:has(input:disabled)) {
    border-color: var(--color-accent--);
    color: var(--color-primary--);
}

.input-wrapper:has(input:user-invalid),
.input-wrapper.error {
    border-color: var(--error-600--) !important;
}

.input-wrapper.without-border {
    border: none;
    background-color: unset;
}

.input-wrapper.dropdown {
    min-width: 50px;
    width: 100%;
}

.input-wrapper.calender {
    width: 100%;
    height: 36px;
    border-radius: 6px;
}

.input-wrapper.calender .icon {
    right: 10px;
}

.input-wrapper.calender span.text {
    position: absolute;
    right: 18px;
}

.input-wrapper.checkbox {
    gap: 4px;
    border: none;
    background-color: transparent;
}
.input-wrapper.h26 {
    height: 26px !important;
}
.input-wrapper.short {
    width: fit-content !important;
}
.input-wrapper.short input{
    max-width: 30px !important;
}
.input-wrapper.medium {
    width: fit-content !important;
}
.input-wrapper.medium input{
    max-width: 100px !important;
}

.input-wrapper .icon {
    display: inline-block;
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    transform: translateY(-50%);
    right: 6px;
    pointer-events: none;
}

.input-wrapper input[type="file"]::file-selector-button {
    border-top: none;
    border-bottom: none;
    border-left: none;
}

/* Form Field */
.form_field {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.form_field.gap-15 {
    gap: 15px;
}

.form_field label {
    color: var(--color-primary--);
}

.form-field-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
}

.form-field-row .form_field {
    width: 45%;
}

/* Form 700px */

form.form-700 {
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

form.form-700 .form_field:not(.w-100) {
    max-width: 340px;
}

form.form-700.col-3 .form_field:not(.w-100) {
    max-width: 220px;
}

form.form-700.col-4 .form_field:not(.w-100) {
    max-width: 160px;
}

@media (max-width: 1024px) {
    form.form-700 .form_field:not(.w-100) {
        max-width: unset;
    }

    .form-field-row .form_field {
        width: 100%;
    }
}
