/* @import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&display=swap'); */
/* @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai+Looped:wght@100;200;300;400;500;600;700;800;900&display=swap'); */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai+Looped:wght@100;200;300;400;500;600;700&display=swap');

body {
    margin: 0;
    padding: 0;
    /* font-family: "Bai Jamjuree", sans-serif; */
    /* font-family: "Noto Sans Thai Looped", sans-serif; */
    font-family: "IBM Plex Sans Thai Looped", sans-serif;
    font-size: 18px;
}

* {
    box-sizing: border-box;
}

input, select {
    height: 28px;
    border-radius: 4px;
    border: 1px solid #a2a2a2;
    background-color: #ffffff;
}

input, select, textarea {
    font-size: 16px;
}

a {
    color: #e9741b;
    text-decoration: none;
    &:hover {
        text-decoration: underline;
    }
}

button, a.btn {
    border-radius: 4px;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 1em;
    box-shadow: 0 0 4px #a5a5a5;

    &.btn-primary {
        background-color: #ff9240;
        color: #ffffff;
        &:hover { background-color: #ff8640; }
    }
    &.btn-secondary {
        background-color: #565656;
        color: #ffffff;
        &:hover { background-color: #565656; }
    }
    &.btn-info {
        background-color: #0568a2;
        color: #ffffff;
        &:hover { background-color: #0568a2; }
    }
    &.btn-success {
        background-color: #1f7f07;
        color: #ffffff;
        &:hover { background-color: #1f7f07; }
    }
    &.btn-danger {
        background-color: #991d1d;
        color: #ffffff;
        &:hover { background-color: #991d1d; }
    }

    &.btn-primary-outlined {
        background-color: unset;
        border: 1px solid #ff9240;
        color: #ff9240;
        &:hover {
            background-color: #ff9240;
            color: #ffffff;
        }
    }
    &.btn-secondary-outlined {
        background-color: unset;
        border: 1px solid #565656;
        color: #565656;
        &:hover {
            background-color: #565656;
            color: #ffffff;
        }
    }
    &.btn-info-outlined {
        background-color: unset;
        border: 1px solid #0568a2;
        color: #0568a2;
        &:hover {
            background-color: #0568a2;
            color: #ffffff;
        }
    }
    &.btn-success-outlined {
        background-color: unset;
        border: 1px solid #1f7f07;
        color: #1f7f07;
        &:hover {
            background-color: #1f7f07;
            color: #ffffff;
        }
    }
    &.btn-danger-outlined {
        background-color: unset;
        border: 1px solid #991d1d;
        color: #991d1d;
        &:hover {
            background-color: #991d1d;
            color: #ffffff;
        }
    }

    &.btn-sm {
        font-size: 0.75em;
        padding: 2px 4px;
    }

    &.btn-text {
        background-color: rgba(0, 0, 0, 0);
        box-shadow: none;
        border: none;
        color: #ff9240;
        &:hover {
            color: #e2641b;
        }
    }

    &:disabled {
        cursor: default;
        background-color: #aeaeae;
        &:hover { background-color: #aeaeae; }
    }
}

.btn-icon {
    background-color: none;
    box-shadow: none;
    border: none;
    border-radius: 9999px;
    aspect-ratio: 1;
    align-content: center;
    &:hover {
        background-color: rgba(0, 0, 0, 0.2);
    }
}

.text-primary {
    color: #e9741b;
}
.text-info {
    color: #0568a2;
}
.text-success {
    color: #1f7f07;
}
.text-secondary {
    color: #565656;
}
.text-warning {
    color: #a98a00;
}
.text-danger {
    color: #991d1d;
}
.text-highlight {
    color: #ff3700;
}

.card {
    border-radius: 16px;
    padding: 16px;
    background-color: #ffffff;
    box-shadow: 0 0 4px #000000;
}

.card .card-actions {
    text-align: right;
}
.card .card-actions .btn {
    font-size: 1.25em;
    padding: 4px 20px;
}

.error {
    background-color: #ffeeee;
    color: #ff0000;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    box-shadow: 0 0 16px #dedede;
}

.modal {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    place-items: center;
    place-content: center;
}

.dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #ffffff;
    margin: 0 16px;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 0 16px 4px #393939;
    max-height: 90vh;
    overflow-y: auto;
}

.dialog .dialog-title {
    display: flex;
    flex-direction: row;
    gap: 4px;
    font-size: 1.2em;
    font-weight: 600;
}

.dialog .dialog-title > span {
    flex-grow: 1;
}

.dialog .dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    align-content: center;
}

.center {
    text-align: center;
}

.small {
    font-size: 0.8em;
}
