/* Spinner Wrapper */
.spinner-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner-wrapper.hidden {
    display: none;
}

/* Overlay Mode */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.spinner-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.spinner-content {
    position: relative;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Spinner Sizes */
.spinner-small {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.spinner-medium {
    width: 2rem;
    height: 2rem;
    border-width: 0.2em;
}

.spinner-large {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
}

/* Spinner Message */
.spinner-message {
    margin: 0;
    color: #374151;
    font-weight: 500;
}

.spinner-overlay .spinner-message {
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
}

/* Button Spinner (Inline) */
.btn .spinner-wrapper {
    margin-left: 0.5rem;
}

/* Dark mode */
html[data-theme="dark"] .spinner-message {
    color: #E6EDF3;
}
