/* start loader https://cssloaders.github.io */
.my-loader {
    width: 48px;
    height: 48px;
    border: 3px dotted var(--color--primary);
    border-style: solid solid dotted dotted;
    border-radius: 50%;
    display: inline-block;
    position: fixed;
    top: 48%;
    left: 48%;
    box-sizing: border-box;
    animation: rotation 2s linear infinite;
}

.my-loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    border: 3px dotted var(--color--primary);
    border-style: solid solid dotted;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    animation: rotationBack 1s linear infinite;
    transform-origin: center center;
}

.my-loading {
    position: fixed;
    z-index: 99999;
    overflow: auto;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.my-loading:before {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(rgba(66, 65, 65, 0.8), rgba(0, 0, 0, .8));
    background: -webkit-radial-gradient(rgba(66, 65, 65, 0.8), rgba(0, 0, 0, .8));
}

.my-loading p.my-context {
    width: 100%;
    position: absolute;
    top: 50%;
    margin-top: 40px;
    text-align: center;
    color: var(--color--foreground);
    z-index: 99999;
    font-weight: bold;
}

.my-hidden {
    display: none !important;
}

.ct-animate-blink {
    animation: myblinker 2.5s infinite;
    animation-fill-mode: both;
}

@keyframes myblinker {
    0% {
        opacity: 0
    }

    50% {
        opacity: 1
    }

    100% {
        opacity: 0
    }
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotationBack {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

/* end loader https://cssloaders.github.io/*/

/* start toast */
.toast-notification {
    border-color: var(--color--border) !important;
    border-radius: var(--color--radius);
    background-color: var(--color--primary) !important;
    color: var(--color--accent-foreground) !important;
    padding: 0 10px !important;
    font-weight: bold !important;
}
.toast-notification div {
    padding: 0 10px !important;
}
/* end toast */

/* start swal */
div:where(.swal2-container) {
    font-family: var(--font--body-font) !important;
}

/* Popup styling */
div:where(.swal2-container) div:where(.swal2-popup) {
    width: 32em !important;
    border-radius: var(--color--radius) !important;
    padding: 1em !important;
}


/* Title styling */
div:where(.swal2-container) h2:where(.swal2-title) {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--color--foreground) !important;
    margin-bottom: 0rem !important;
    padding: 0 !important;
}

/* Content styling */
div:where(.swal2-container) div:where(.swal2-html-container) {
    color: var(--color--muted-foreground) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    margin-bottom: 1rem !important;
}

/* Input styling */
div:where(.swal2-container) input:where(.swal2-input),
div:where(.swal2-container) textarea:where(.swal2-textarea) {
    border: 1px solid var(--color--border) !important;
    border-radius: var(--color--radius) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    background-color: var(--color--background) !important;
    color: var(--color--foreground) !important;
    margin: 0.5rem 0 !important;
    font-family: inherit !important;
}

/* Textarea specific styling */
div:where(.swal2-container) textarea:where(.swal2-textarea) {
    line-height: 1.4 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    resize: vertical !important;
    min-height: 80px !important;
    max-height: 200px !important;
    height: auto !important;
    overflow-y: auto !important;
}

div:where(.swal2-container) input:where(.swal2-input):focus,
div:where(.swal2-container) textarea:where(.swal2-textarea):focus {
    border-color: var(--color--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(48, 133, 214, 0.2) !important;
}

/* Actions container */
div:where(.swal2-container) div:where(.swal2-actions) {
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
}

/* Base button styling */
div:where(.swal2-container) button:where(.swal2-styled) {
    border-radius: var(--color--radius) !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    border: 1px solid transparent !important;
    min-height: 36px !important;
    min-width: 80px !important;
}

/* Save/Confirm button */
div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm {
    background-color: var(--color--primary) !important;
    color: white !important;
    border-color: var(--color--primary) !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:hover {
    background-color: var(--color--primary) !important;
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(48, 133, 214, 0.3) !important;
}

/* Cancel button */
div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel {
    background-color: transparent !important;
    color: var(--color--foreground) !important;
    border-color: var(--color--border) !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:hover {
    background-color: var(--color--accent) !important;
    color: var(--color--accent-foreground) !important;
    border-color: var(--color--border) !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus {
    box-shadow: 0 0 0 3px rgba(100, 100, 100, 0.2) !important;
}

/* Hide deny button if not used */
div:where(.swal2-container) button:where(.swal2-styled).swal2-deny {
    display: none !important;
}

/* Validation message styling */
div:where(.swal2-container) div:where(.swal2-validation-message) {
    background-color: #dc2626 !important;
    color: white !important;
    border-radius: var(--color--radius) !important;
    font-size: 0.875rem !important;
    order: -1 !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    padding: 0.5rem 0.75rem !important;
}

/* Make the popup content flex to reorder validation message */
div:where(.swal2-container) div:where(.swal2-popup) {
    display: flex !important;
    flex-direction: column !important;
}

div:where(.swal2-container) div:where(.swal2-html-container):has(.swal2-validation-message) {
    display: flex !important;
    flex-direction: column !important;
}

.swal2-show-full {
    width: auto !important;
}
/* end swal */

/* start typeahead */
#prefetch .typeahead:focus,
#prefetch .tt-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.tt-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 5px 0 0;
    padding: 8px 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.tt-suggestion {
    padding: 10px 12px;
    cursor: pointer;
    color: #333;
    border-bottom: 1px solid #f8f8f8;
    transition: background-color 0.2s ease;
}

.tt-suggestion:last-child {
    border-bottom: none;
}

.tt-suggestion:hover,
.tt-suggestion.tt-cursor {
    background-color: #f1f1f1;
    color: #000;
}

.tt-empty {
    padding: 10px 12px;
    color: #888;
    text-align: center;
}
/* end typeahead */

/* start tagify */
.tagify__tag {
    margin-top: 6.5px !important;
}
.tagify__input, .tagify__input:focus, .tagify__input::before, .tagify__input::after {
    text-align: left !important;
    color: var(--color--foreground) !important;
}
.tagify__dropdown {
    min-width: 200px !important;
    max-height: 200px !important;
    overflow: hidden;
    font-size: 15px;
    border: 1px solid var(--color--border);
    border-radius: var(--color--radius);
}
/* end tagify */

/* start skeleton */
.skeleton-loader {
    border-radius: inherit;
    /* Inherit the border-radius of the parent element */
    background: linear-gradient(to right, #f6f7f8 25%, #e0e0e0 50%, #f6f7f8 75%);
    background-size: 200% 100%;
    /* Increase the size of the background image */
    z-index: 1;
    /* Make sure the skeleton loader is on top of the content */
    animation: skeleton 1s infinite linear;
    min-width: 30px;
}

@keyframes skeleton {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 100% 0;
    }
}

[ms-code-skeleton] {
    background-clip: padding-box;
}

.my-skeleton-loader {
    border-radius: inherit;
    background: linear-gradient(to right, #f6f7f8 25%, #e0e0e0 50%, #f6f7f8 75%);
    background-size: 200% 100%;
    z-index: 1;
    animation: skeleton 1s infinite linear;
    padding: 0 10px;
    color: transparent;
    font-weight: normal;
    line-height: 22px;
    border-radius: var(--color--radius);
    min-width: 30px !important;
    min-height: 25px !important;
}
/* end skeleton */

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none; /* Prevents any interaction */
    border-color: var(--color--border);
    background-color: var(--color--accent);
    color: var(--color--accent-foreground);
}

@media screen and (max-width: 1025px) {
    .my-loader {
        top: 26%;
        left: 47.5%;
    }

    .my-loading p.my-context {
        top: 27%;
    }
}

@media screen and (max-width: 479px) {
    .my-loader {
        top: 35%;
        left: 44%;
    }
    .my-loading p.my-context {
        top: 37%;
    }
}

/* Edit overlay for inline editing */
.edit-overlay {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

