/* Theme-aware logo: hide both by default, show only the correct one */
.logo-light,
.logo-dark {
    display: none !important;
}

[data-bs-theme="light"] .logo-light,
[data-bs-theme="dark"] .logo-dark {
    display: inline !important;
}

/* Touch-friendly task buttons */
.task-btn {
    min-height: 100px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    touch-action: manipulation;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    user-select: none;
}

.task-btn:active {
    transform: scale(0.96);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Sticky User ID bar at bottom */
.sticky-userid-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 0;
    background: var(--bs-body-bg);
    border-top: 2px solid var(--bs-primary);
    z-index: 1050;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Ensure content isn't hidden behind sticky bar */
body:has(.sticky-userid-bar) {
    padding-bottom: 90px;
}

/* Auto-dismiss flash animation */
.flash-msg {
    animation: fadeOutFlash 4s forwards;
}

@keyframes fadeOutFlash {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

/* Admin table tweaks */
.table td, .table th {
    vertical-align: middle;
}

/* Prevent double-tap zoom on touch devices */
* {
    touch-action: manipulation;
}

/* Success Popup Overlay */
.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInOverlay 0.2s ease-out;
}

.success-popup {
    background: var(--bs-success, #198754);
    color: white;
    padding: 2.5rem 3.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s ease-out;
    max-width: 90%;
}

.success-popup-icon {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1;
}

.success-popup-message {
    font-size: 1.5rem;
    font-weight: 600;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-popup-overlay.fade-out {
    animation: fadeOutOverlay 0.3s ease-in forwards;
}

@keyframes fadeOutOverlay {
    from { opacity: 1; }
    to { opacity: 0; }
}
