/* Modify default CSS */
html {
    font-family: Roboto, sans-serif;
}

th > div.v-data-table-header__content > span,
td.v-data-table__td {
    white-space: nowrap;
}

.v-application * {
    transition: background-color 0.2s;
}

.v-chip:not(.v-chip--label) {
    border-radius: 9999px;
}

.main-container {
    padding-left: calc(var(--v-layout-left)) !important;
    --v-layout-right: 0px !important;
    --v-layout-top: 64px !important;
}

.v-field--appended:has(.ignore-appended-padding) {
    --v-field-padding-end: 0 !important;
    padding-inline-end: 0 !important;
}

.v-progress-linear__background,
.v-progress-linear__buffer {
    opacity: 0.75 !important;
}

.v-text-field .v-input__details {
    padding: 0 !important;
    align-items: flex-start !important;
}

.v-field--variant-outlined.v-field--focused .v-field__outline {
    --v-field-border-width: 1px !important;
}

@media (hover: hover) {
    .v-input.v-input--readonly .v-field:hover .v-field__outline.text-grey {
        --v-field-border-opacity: 0.38 !important;
    }
}

.v-input.v-input--readonly
    .v-field.v-field--focused
    .v-field__outline.text-grey,
.v-input.v-input--error.v-input--readonly .v-field__outline.text-grey {
    --v-field-border-opacity: 0.38 !important;
}

div.v-input.border-primary-on-hover:hover .v-field__outline {
    color: rgb(var(--v-theme-primary)) !important;
}

/* Animations */
.animation-shrink-width {
    animation-duration: 3s;
    animation-delay: 0s;
    animation-timing-function: linear;
    animation-name: shrink-width;
    animation-direction: normal;
    animation-fill-mode: forwards;
    transform-origin: left center;
}

@keyframes shrink-width {
    0% {
        scale: 1 1;
    }
    100% {
        scale: 0 1;
    }
}

.animation-shake-x {
    animation: shake-x 0.6s cubic-bezier(0.25, 0.8, 0.5, 1);
}

@keyframes shake-x {
    59% {
        transform: translateX(0);
    }

    60%,
    80% {
        transform: translateX(2px);
    }

    70%,
    90% {
        transform: translateX(-2px);
    }
}

.dimming {
    animation: 1s linear 0s infinite dimming;
}

@keyframes dimming {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(0.8);
    }
    100% {
        filter: brightness(1);
    }
}

.animation-v-progress-wave {
    position: relative;
    overflow: hidden;
    .v-progress-linear__determinate::after {
        position: absolute;
        content: '';
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent
        );
        animation: wave 2s infinite ease-out;
    }
}

@keyframes wave {
    0% {
        left: -75%;
        opacity: 0.3;
    }
    25% {
        left: 50%;
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0.3;
    }
}

.animation-rotate {
    animation: 2.5s linear 0s infinite rotate;
}

@keyframes rotate {
    from {
        -webkit-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
    to {
        -webkit-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
}

/* Utility classes */

/* Font weight */
.font-weight-semibold {
    font-weight: 600 !important;
}

/* Font size */
.text-2xs {
    font-size: 0.6rem !important;
}

.text-xs {
    font-size: 0.7rem !important;
}

.text-sm {
    font-size: 0.85rem !important;
}

.text-md {
    font-size: 1rem !important;
}

.text-lg {
    font-size: 1.15rem !important;
}

.text-xl {
    font-size: 1.25rem !important;
}

.text-2xl {
    font-size: 1.4rem !important;
}

.text-4xl {
    font-size: 2rem !important;
}

/* Position */
.inset-0 {
    inset: 0 !important;
}

.top-2 {
    top: 0.5rem !important;
}

.top-3 {
    top: 0.75rem !important;
}

.right-0 {
    right: 0 !important;
}

.right-4 {
    right: 0.75rem !important;
}

.bottom-6 {
    bottom: 1.5rem !important;
}

.left-0 {
    left: 0 !important;
}

.left-3 {
    left: 0.75rem !important;
}

/* Margin, Padding */
.mt-nfull {
    margin-top: -100% !important;
}

.mb-0\.5 {
    margin-bottom: 0.125rem !important;
}

/* Width, Height */
.w-fit {
    width: fit-content !important;
}

.w-5 {
    width: 1.25rem !important;
}

.w-10 {
    width: 2.5rem !important;
}

.w-20 {
    width: 5rem !important;
}

.w-30 {
    width: 7.5rem !important;
}

.w-35 {
    width: 8.75rem !important;
}

.w-40 {
    width: 10rem !important;
}

.w-50 {
    width: 12.5rem !important;
}

.w-60 {
    width: 15rem !important;
}

.w-70 {
    width: 17.5rem !important;
}

.w-75 {
    width: 18.75rem !important;
}

.w-80 {
    width: 20rem !important;
}

.w-120 {
    width: 30rem !important;
}

.w-50dvw {
    width: 50dvw !important;
}

.w-50p {
    width: 50% !important;
}

.w-min-fit {
    min-width: fit-content !important;
}

.w-min-0 {
    min-width: 0 !important;
}

.w-min-40 {
    min-width: 10rem !important;
}

.w-min-100 {
    min-width: 25rem !important;
}

.w-min-120 {
    min-width: 30rem !important;
}

.w-min-140 {
    min-width: 35rem !important;
}

.w-max-fit {
    max-width: fit-content !important;
}

.w-max-112 {
    max-width: 28rem !important;
}

.w-max-120 {
    max-width: 30rem !important;
}

.w-max-180 {
    max-width: 45rem !important;
}

.w-max-200 {
    max-width: 50rem !important;
}

.w-max-220 {
    max-width: 55rem !important;
}

.w-max-50dvw {
    max-width: 50dvw !important;
}

.w-max-90p {
    max-width: 90% !important;
}

.w-max-full {
    max-width: 100% !important;
}

.h-fit {
    height: fit-content !important;
}

.h-1 {
    height: 0.25rem !important;
}

.h-6 {
    height: 1.5rem !important;
}

.h-10 {
    height: 2.5rem !important;
}

.h-11 {
    height: 2.25rem !important;
}

.h-12 {
    height: 3rem !important;
}

.h-14 {
    height: 3.5rem !important;
}

.h-15 {
    height: 3.75rem !important;
}

.h-50dvh {
    height: 50dvh !important;
}

.h-90dvh {
    height: 90dvh !important;
}

.h-dvh {
    height: 100dvh !important;
}

.h-33p {
    height: 33.3% !important;
}

.h-min-0 {
    min-height: 0 !important;
}

.h-min-10 {
    min-height: 2.5rem !important;
}

.h-min-160 {
    min-height: 40rem !important;
}

.h-max-50dvh {
    max-height: 50dvh !important;
}

.h-max-70dvh {
    max-height: 70dvh !important;
}

.h-max-90p {
    max-height: 90% !important;
}

.h-max-full {
    max-height: 100% !important;
}

/* z-index */
.z-1 {
    z-index: 1 !important;
}

.z-100 {
    z-index: 100 !important;
}

/* Gap */
.gap-2 {
    gap: 0.5rem !important;
}

.gap-4 {
    gap: 1rem !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

/* Pointer events */
.pointer-none {
    pointer-events: none !important;
}

/* Transitions */
.transition-background-color {
    transition: background-color 0.2s ease-in-out !important;
}

/* Table layout */
.table-fixed {
    table-layout: fixed !important;

    table {
        table-layout: fixed !important;
    }
}

/* Align/Justify */
.justify-items-center {
    justify-items: center !important;
}

.content-center {
    align-content: center !important;
}

/* User select */

.select-none {
    user-select: none !important;
}

/* Classes for environment without vuetify */
.hidden {
    display: none;
}

.card {
    padding: 1.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.position-center {
    position: absolute;
    inset: 0;
    margin: auto;
}

.size-fit {
    width: fit-content;
    height: fit-content;
}

.content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* object-fit */
.object-contain {
    object-fit: contain !important;
}

/* etc */

.ratio-a4 {
    aspect-ratio: 1 / 1.4142; /* A4 비율 */
}

.scroll-fade {
    --fade: 16px; /* 페이드 높이 조절 */
    overflow: auto;

    /* WebKit/Blink */
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0,
        black var(--fade),
        black calc(100% - var(--fade)),
        transparent 100%
    );
    -webkit-mask-repeat: no-repeat;

    /* Firefox 등 표준 속성 */
    mask-image: linear-gradient(
        to bottom,
        transparent 0,
        black var(--fade),
        black calc(100% - var(--fade)),
        transparent 100%
    );
    mask-repeat: no-repeat;
}
