/* Mobile Bottom Navigation */

@media (max-width: 768px) {
    .main-content {
        padding-top: 12px !important;
        padding-bottom: 0 !important;  
    }
}

/* Scroll to top button */
.scroll-top-btn {
    display: none;
    position: fixed;
    bottom: 80px;
    inset-inline-end: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--c-text);
    color: var(--c-on-primary);
    border: none;
    font-size: 16px;
    cursor: pointer;
    z-index: 8999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
    transition: opacity var(--mo-slow) var(--ease-out), transform var(--mo-slow) var(--ease-out);
    opacity: 0;
    transform: translateY(10px);
}

.scroll-top-btn.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.scroll-top-btn:active {
    transform: scale(0.9);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;  /* physical on purpose: centred with translateX(-50%) */
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-ui);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    pointer-events: auto;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(10px);
    direction: rtl;
}

.toast.toast-out {
    animation: toastOut 0.3s var(--ease-out) forwards;
}

.toast-success {
    background: var(--c-success);
    color: var(--c-on-primary);
}

.toast-error {
    background: var(--c-danger);
    color: var(--c-on-primary);
}

.toast-info {
    background: var(--c-primary);
    color: var(--c-on-primary);
}

.toast i {
    font-size: 16px;
}

/* Undo-style toast: includes an action button on the side */
.toast-with-action {
    padding: 8px 8px 8px 18px;
}
.toast-with-action .toast-msg { flex: 1; }
.toast-action {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--c-on-primary);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--mo-fast) var(--ease-out), transform var(--mo-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .toast-action:hover  { background: rgba(255, 255, 255, 0.28); }
}
.toast-action:active { transform: scale(0.96); }

