/* Shared motion and search treatment for the school portal. */
:root {
    --portal-blue: #075985;
    --portal-cyan: #0891b2;
    --portal-ink: #123047;
    --portal-paper: #f8fbfd;
}

body {
    background: var(--portal-paper);
}

button,
a,
input,
select,
.card,
section,
.role-btn {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

button:hover,
.button-link:hover,
.role-btn:hover {
    transform: translateY(-2px);
}

section,
.card,
.roster-sheet,
form.assignment-form {
    animation: portal-rise .45s ease both;
}

section:nth-of-type(2),
.card:nth-child(2) {
    animation-delay: .06s;
}

section:nth-of-type(3),
.card:nth-child(3) {
    animation-delay: .12s;
}

.user-search-dock {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(440px, calc(100vw - 32px));
    padding: 10px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(8, 47, 73, .18);
    backdrop-filter: blur(10px);
    animation: search-dock-in .5s ease both;
}

.user-search-dock label {
    color: var(--portal-blue);
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
}

.user-search-dock input {
    min-width: 0;
    flex: 1;
    padding: 10px 12px;
    color: var(--portal-ink);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
}

.user-search-dock input:focus {
    border-color: var(--portal-cyan);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, .14);
}

.user-search-count {
    min-width: 28px;
    color: #0e7490;
    font-size: .78rem;
    font-weight: 800;
    text-align: center;
}

@keyframes portal-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes search-dock-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
    .user-search-dock {
        right: 16px;
        bottom: 16px;
        width: calc(100vw - 32px);
    }

    .user-search-dock label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
