* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    /* padding-top: env(safe-area-inset-top); */
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    color: #212223;
    background-color: #ffffff;
}

.app-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    padding-top: calc(env(safe-area-inset-top) + 20px);
}

a {
    text-decoration: none;
    color: crimson;

    &:hover {
        font-weight: 500;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #3c3c3c;
    font-size: 14px;

    & thead {
        background-color: #efefef;
    }

    & tbody tr:hover,
    tbody tr:focus-within {
        background-color: #f3f3f388;
    }

    & td,
    & th {
        padding: 0.5rem;
        border: 1px solid #ccc;
    }
}

input,
button,
textarea,
select,
option,
.button {
    font-family: inherit;
    font-size: inherit;
    transition: 300ms ease-in-out;
}

*::placeholder {
    opacity: 0.5;
    font-weight:normal;
}

input,
textarea,
select,
option {
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #e1e2e3;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    outline: transparent;
    resize: none;

    &:required {
        border-left: 2px solid crimson;
    }

    &:focus {
        background-color: #f9f9f9;
        border: 1px solid #3c3c3c;

        &:required {
            background-color: #ff000008;
            border: 1px solid crimson;
            border-left: 2px solid crimson;
        }
    }


    &:disabled {
        cursor: not-allowed;
    }
}


button,
.button {
    --bg: #3c3c3c;
    --fg: #efefef;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    background-color: var(--bg);
    color: var(--fg);
    padding: 0.5rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.35rem;
    opacity: 0.9;

    &:not(:disabled):hover {
        cursor: pointer;
        opacity: 1;
    }

    &:active {
        opacity: 0.8;
    }

    &:disabled {
        cursor: not-allowed;
        opacity: 0.65;
    }
}


.large {
    font-size: 18px;
    padding: 0.75rem 1.5rem;

    & svg {
        width: 22px;
        height: 22px;
    }
}

.small {
    font-size: 12px;
    padding: 0.25rem 0.5rem;

    & svg {
        width: 12px;
        height: 12px;
    }
}

.medium {
    font-size: 14px;
    padding: 0.35rem 0.75rem;

    & svg {
        width: 14px;
        height: 14px;
    }
}

button.small,
.button.small {
    padding: 0.25rem 0.75rem;
}

button.medium,
.button.medium {
    padding: 0.35rem 1rem;
}

input,
select,
textarea {
    &.large {
        padding: 0.75rem 1rem;
    }
}

.outline {
    --bg: transparent;
    --fg: #3c3c3c;
    --bdr: #3c3c3c;

    &:hover {
        background-color: var(--fg);
        color: #efefef;
    }
}

.ghost {
    --bg: transparent;
    --fg: #3c3c3c;
    --bdr: transparent;

    &:hover {
        background-color: #eee;
        color: #3c3c3c;
        border: 1px solid #c1c2c3;
    }
}

.accent {
    --bg: indigo;
    --fg: #efefef;
    --bdr: transparent;
}

.success {
    --bg: forestgreen;
    --fg: #efefef;
    --bdr: transparent;
}

.danger {
    --bg: crimson;
    --fg: #efefef;
    --bdr: transparent;
}

.warning {
    --bg: orange;
    --fg: #3c3c3c;
    --bdr: transparent;
}

.info {
    --bg: skyblue;
    --fg: #3c3c3c;
    --bdr: transparent;
}

.secondary {
    --bg: #eee;
    --fg: #3c3c3c;
    --bdr: #d1d2d3;
}

.outline,
.ghost,
.accent,
.success,
.danger,
.warning,
.info,
.secondary {
    background-color: var(--bg);
    color: var(--fg);
    border: 1px solid var(--bdr);
}


.m1 {
    margin: 1rem
}

.ml1 {
    margin-left: 1rem;
}

.mr1 {
    margin-right: 1rem;
}

.mt05 {
    margin-top: 0.5rem;
}

.mt1 {
    margin-top: 1rem;
}

.mb05 {
    margin-bottom: 0.5rem;
}

.mb1 {
    margin-bottom: 1rem;
}

.mx1 {
    margin-inline: 1rem;
}

.my1 {
    margin-block: 1rem
}

.p1 {
    padding: 1rem
}

.pl1 {
    padding-left: 1rem;
}

.pr1 {
    padding-right: 1rem;
}

.pt1 {
    padding-top: 1rem;
}

.pb1 {
    padding-bottom: 1rem;
}

.px1 {
    padding-inline: 1rem
}

.py1 {
    padding-block: 1rem
}

.flex {
    display: flex;
    flex-direction: row;
}

.wrap {
    flex-wrap: wrap;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.jcfs {
    justify-content: flex-start;
}

.jcfe {
    justify-content: flex-end;
}

.jcc {
    justify-content: center;
}

.jcsa {
    justify-content: space-around;
}

.jcsb {
    justify-content: space-between;
}

.jcse {
    justify-content: space-evenly;
}

.aifs {
    align-items: flex-start;
}

.aic {
    align-items: center;
}

.aife {
    align-items: flex-end;
}

.g025 {
    gap: 0.25rem
}

.g05 {
    gap: 0.5rem
}

.g075 {
    gap: 0.75rem
}

.g1 {
    gap: 1rem;
}

.fs-24 {
    font-size: 24px
}

.fs-20 {
    font-size: 20px
}

.fs-12 {
    font-size: 12px
}

.w100 {
    width: 100%
}

.f1 {
    flex: 1
}

.ntw {
    text-wrap: nowrap;
}

.hide {
    display: none;
}

img {
    display: block;
}

/* Select */
select {
    appearance: none;
    width: 100%;
}

.select {
    position: relative;

    &::after {
        z-index: 1;
        content: "";
        position: absolute;
        right: 0.5rem;
        top: 50%;
        width: 22px;
        height: 22px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23919293'%3E%3Cpath d='M12,15.4l-6-6L7.4,8L12,12.6L16.6,8L18,9.4l-6,6Z'/%3E%3C/svg%3E") center / contain no-repeat;
        pointer-events: none;
        transform: translateY(-50%) rotate(0deg);
        transition: transform 300ms ease-in-out;
    }

    &:focus-within:has(select:focus) {
        &::after {
            content: "";
            transform: translateY(-50%) rotate(180deg) !important;
        }
    }
}

input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    --bg: #3c3c3c;
    --bdr: #3c3c3c;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border: 1.5px solid #c1c2c3;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    transition: background-color 0.2s, border-color 0.2s;

    &:focus {
        outline: transparent;
        background-color: #f6f6f6;
        border: 1.5px solid #000;
    }

    &:required {
        border: 1.5px solid crimson !important;
    }

    &:checked {
        background-color: var(--bg);
        border-color: var(--bdr);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' %3E%3Cpath d='M9.55 18l-5.7-5.7 1.43-1.42 4.28 4.28 9.18-9.18 1.41 1.42L9.55 18z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 16px 16px;

        &:required {
            background-color: crimson;
        }
    }


    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
}

label {
    width: 100%;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    gap: 0.25rem;
    color: #999;
}


.o0 {
    opacity: 0;
}

.o25 {
    opacity: 0.25;
}

.o5 {
    opacity: 0.5;
}

.o75 {
    opacity: 0.75;
}

.o1 {
    opacity: 1;
}

.validation-message {
    color: red;
    font-size: 12px;
    margin-top: 0.25rem;
}

.rounded {
    border-radius: 9999px !important;
}

.grid {
    --cols: 200px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--cols), 1fr));
}

.fit {
    width: fit-content;
}

.switch {
    width: 40px !important;
    height: 22px !important;
    border-radius: 9999px !important;
    position: relative;
    background-color: transparent !important;

    &:not(:checked)::before {
        content: '';
        position: absolute;
        width: calc(50% - 4px);
        height: calc(100% - 4px);
        background-color: #c1c2c3;
        border-radius: 50%;
        left: 2px;
        top: 2px;
    }

    &:required::before {
        background-color: #f004 !important;
    }

    &:checked::after {
        content: '';
        position: absolute;
        width: calc(50% - 4px);
        height: calc(100% - 4px);
        background-color: var(--bg);
        border-radius: 50%;
        right: 2px;
        top: 2px;
    }

    &:required:checked:after {
        background-color: #f00 !important;
    }
}

.tal {
    text-align: left
}

.tac {
    text-align: center
}

.taj {
    text-align: justify
}

.tar {
    text-align: right
}

.validation-summary-errors {
    margin: 0.5rem 1rem;
}

input[type="file"] {
    position: relative;
    min-height: 36px;
    /* &::file-selector-button {
        display: none;
    } */
}
