/* =========================
   UTILITIES, ANIMATIONS & OTHER COMPONENTS
   ========================= */

/* Fixed bottom bar with glassmorphism */
.fixed-bottom.bg-light {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 -10px 30px -10px rgba(0, 0, 0, 0.1) !important;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

    .fade-in-up:nth-child(1) {
        animation-delay: 0.1s;
    }

    .fade-in-up:nth-child(2) {
        animation-delay: 0.2s;
    }

    .fade-in-up:nth-child(3) {
        animation-delay: 0.3s;
    }

    .fade-in-up:nth-child(4) {
        animation-delay: 0.4s;
    }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Badge Enhancements */
.badge {
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.transition-opacity {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .qb-toggle-section {
        padding: 1.75rem;
    }

    .switch-label label {
        font-size: 1.05rem;
    }
}

.switch-label label {
    font-size: 1.1rem;
    color: #1e293b;
}

.switch-label small {
    font-size: 0.875rem;
    color: #64748b;
}

.modern-toggle {
    width: 3.5rem !important;
    height: 1.70rem !important;
    background: #e2e8f0 !important;
    border: none !important;
    border-radius: 2rem !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

    .modern-toggle::before {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 1.35rem;
        height: 1.35rem;
        background: white;
        border-radius: 50%;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .modern-toggle:hover {
        background: #cbd5e1 !important;
        transform: scale(1.02) !important;
    }

        .modern-toggle:hover::before {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

    .modern-toggle:checked {
        background: linear-gradient(135deg, #086973, #0891b2) !important;
    }

        .modern-toggle:checked::before {
            transform: translateX(1.75rem);
            background: white;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .modern-toggle:checked:hover {
            background: linear-gradient(135deg, #023d43, #0e7490) !important;
            transform: scale(1.02) !important;
        }

    .modern-toggle:focus {
        box-shadow: 0 0 0 3px rgba(8, 105, 115, 0.1) !important;
        outline: none !important;
    }

@media (max-width: 576px) {
    .qb-toggle-section {
        padding: 1.5rem;
        border-top: 1px solid #f1f5f9;
    }

    .modern-switch {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .switch-label {
        width: 100%;
        margin-bottom: 0.5rem;
    }

        .switch-label label {
            font-size: 1rem !important;
            word-wrap: break-word;
            line-height: 1.4;
        }

        .switch-label small {
            font-size: 0.8rem !important;
            margin-top: 0.25rem;
        }

    .modern-toggle {
        align-self: flex-end;
        margin-top: 0.5rem;
        width: 3rem !important;
        height: 1.5rem !important;
    }

        .modern-toggle::before {
            width: 1.1rem !important;
            height: 1.1rem !important;
        }

        .modern-toggle:checked::before {
            transform: translateX(1.5rem) !important;
        }
}

/* Modern Badge Styling */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

    .status-badge.active {
        background: linear-gradient(135deg, #dcfce7, #bbf7d0);
        color: #166534;
    }

    .status-badge.inactive {
        background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
        color: #64748b;
    }

/* =========================
   MOBILE UTILITY CLASSES
   ========================= */

/* Mobile-specific display utilities */
@media (max-width: 767.98px) {
    .d-mobile-none { display: none !important; }
    .d-mobile-block { display: block !important; }
    .d-mobile-flex { display: flex !important; }
    .d-mobile-inline-block { display: inline-block !important; }
    
    .text-mobile-center { text-align: center !important; }
    .text-mobile-left { text-align: left !important; }
    .text-mobile-right { text-align: right !important; }
    
    .w-mobile-100 { width: 100% !important; }
    .w-mobile-auto { width: auto !important; }
}

/* Desktop-specific display utilities */
@media (min-width: 768px) {
    .d-desktop-none { display: none !important; }
    .d-desktop-block { display: block !important; }
    .d-desktop-flex { display: flex !important; }
    .d-desktop-inline-block { display: inline-block !important; }
}

/* =========================
   ACCESSIBILITY ENHANCEMENTS
   ========================= */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================
   FOOTER GLASSMORPHISM
   ========================= */

.cube-footer {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.5) !important;
}
