@import url("../vendor/trix/dist/trix--HySfg_.css");
@import url("pell-ApX9crq.css");

/* Optional: Set a minimum height so it doesn't look squashed */
/* trix-editor {
    min-height: 250px;
    background: #fff;
} */

trix-editor {
    min-height: 400px !important;
    height: auto;
    background-color: #fff;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem;
    padding: 1rem !important;
}

trix-toolbar .trix-button-group {
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem;
    margin-bottom: 10px !important;
}

/* This hides the raw ${} and content until Vue is ready */
[v-cloak],
.skeleton-loader {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

/* 2. Hide everything inside while loading */
[v-cloak] > *,
.skeleton-loader > * {
    opacity: 0 !important;
    visibility: hidden !important;
}

[v-cloak]::before,
.skeleton-loader::before {
    /* Configuration */
    --bar-bg: #f2f3f5;
    --shimmer-color: rgba(255, 255, 255, 0.8);
    --bar-h: 28px;
    --bar-gap: 40px; /* Vertical distance between start of bars */
    --p-left: 20px;
    --p-top: 25px;

    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;

    /* Gradients */
    background:
        linear-gradient(90deg, rgba(255,255,255,0) 0, var(--shimmer-color) 50%, rgba(255,255,255,0) 100%),
        linear-gradient(var(--bar-bg) var(--bar-h), transparent 0),
        linear-gradient(var(--bar-bg) var(--bar-h), transparent 0),
        linear-gradient(var(--bar-bg) var(--bar-h), transparent 0);

    background-repeat: no-repeat;

    /* Dynamic Sizing */
    background-size:
        200% 100%,
        80% var(--bar-h),
        90% var(--bar-h),
        60% var(--bar-h);

    /* Calculated Positioning */
    background-position:
        -100% 0,
        var(--p-left) var(--p-top),
        var(--p-left) calc(var(--p-top) + var(--bar-gap)),
        var(--p-left) calc(var(--p-top) + (var(--bar-gap) * 2));

    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    /* We only animate the first background layer (the shimmer) */
    to {
        background-position:
            100% 0,
            var(--p-left) var(--p-top),
            var(--p-left) calc(var(--p-top) + var(--bar-gap)),
            var(--p-left) calc(var(--p-top) + (var(--bar-gap) * 2));
    }
}

/* 1. The Container State */
.is-loading {
    position: relative !important;
    pointer-events: none; /* Prevents clicks while loading */
    user-select: none;
    transition: opacity 0.3s ease;
}

/* 2. The Semi-Transparent Overlay */
.is-loading::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 100;
    border-radius: inherit; /* Matches the card's rounded corners */
}

/* 3. The Animated Spinner */
.is-loading::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 30px; height: 30px;
    margin: -15px 0 0 -15px; /* Perfect centering */
    border: 3px solid #e5e7eb; /* Light grey track */
    border-top-color: #3b82f6; /* Ethereum/Primary blue */
    border-radius: 50%;
    z-index: 101;
    animation: spin 0.8s linear infinite;
}

.toggle-password .btn,
.toggle-password .btn:is(:hover, :active, :focus),
.btn.btn-align,
.btn.btn-align:is(:hover, :active, :focus) {
    block-size: auto;
    margin-block-start: initial;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
