/*
 * FlowUI Core CSS
 * CSS custom properties, base utilities, and animation keyframes.
 */

/* -- Variables -------------------------------------------------------------- */
:root {
    /* Admin layout */
    --flowui-sidebar-width:           260px;
    --flowui-sidebar-collapsed-width: 64px;
    --flowui-topbar-height:           60px;

    /* Transitions */
    --flowui-transition:       all 0.3s ease;
    --flowui-transition-fast:  all 0.15s ease;

    /* Animation defaults */
    --flowui-animate-duration: 0.6s;
    --flowui-animate-easing:   cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --flowui-shadow-sm:  0 1px 4px rgba(0,0,0,.12);
    --flowui-shadow:     0 2px 12px rgba(0,0,0,.18);
    --flowui-shadow-lg:  0 8px 32px rgba(0,0,0,.24);
}

/* -- Dropdown fade-in ------------------------------------------------------ */
@keyframes flowuiDropIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0);   }
}

.dropdown-menu.show {
    animation: flowuiDropIn 0.2s ease both;
}

/* -- Back to top ----------------------------------------------------------- */
#backToTop {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: var(--flowui-transition-fast);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* -- Utility: section padding ---------------------------------------------- */
.section-pad {
    padding-top:    5rem;
    padding-bottom: 5rem;
}

.section-pad-sm {
    padding-top:    3rem;
    padding-bottom: 3rem;
}

/* -- Utility: smooth scroll ------------------------------------------------ */
html {
    scroll-behavior: smooth;
}

/* -- Theme switcher — shared between frontend and admin -------------------- */
.theme-mode-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.theme-mode-btns .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0;
}

.theme-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: var(--flowui-transition-fast);
    position: relative;
}

.theme-swatch:hover,
.theme-swatch.active {
    border-color: var(--bs-body-color);
    transform: scale(1.15);
}

/* Tooltip on hover */
.theme-swatch[title]::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-dark);
    color: var(--bs-white);
    font-size: 0.65rem;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: var(--bs-border-radius-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.theme-swatch:hover[title]::after {
    opacity: 1;
}

/* -- Avatar fixed sizes ---------------------------------------------------- */
.avatar-64 { width: 64px; height: 64px; }
.avatar-72 { width: 72px; height: 72px; }
