/* ========================================
   MOBILE NAVBAR WITH CURVED NOTCH
   Using radial-gradient for smooth cutout
   ======================================== */

@media (max-width: 768px) {
    body {
        padding-top: 20px;
        padding-bottom: 52px;
        /* 60% of 85px */
    }

    .navbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: 42px;
        background: radial-gradient(circle at 50% -5px, transparent 45px, #ffffff 46px);
        /* Deep-Bottom Notch */
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
        z-index: 2500;
        overflow: visible;
        border: none;
    }

    .navbar-container {
        position: relative;
        padding: 0;
        height: 100%;
        max-width: none;
    }

    .navbar-brand {
        display: none;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-menu {
        display: flex !important;
        height: 100%;
        width: 100%;
        justify-content: space-evenly;
        align-items: center;
        padding: 0 10px;
        margin: 0;
        background: transparent;
        position: relative;
    }

    .navbar-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        padding: 5px 0 0 0;
        /* Lowered icons (v=7.1) */
        gap: 0;
        /* Removed gap to raise text (v=7.2) */
        font-size: 0.45rem;
        /* Smallest legible text (v=7.0) */
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: #64748b;
        background: transparent !important;
        border: none !important;
        transition: all 0.2s ease;
    }

    .navbar-item svg {
        width: 20px !important;
        /* Increased for better visibility */
        height: 20px !important;
        stroke-width: 2.5px;
    }

    .navbar-item span:last-child {
        margin-top: -2px;
        /* Negative margin to pull text up further (v=7.2) */
    }

    /* Adjust alignment for "Files" text (v=7.4) */
    .navbar-item[data-section="datafiles"] span:last-child {
        margin-left: -3px;
        /* Pull text left (corrected) */
    }

    .navbar-item.active {
        color: #FF512F !important;
    }

    .navbar-item:hover {
        color: #FF512F;
        transform: translateY(-2px);
    }

    /* Center spacer for symmetrical layout */
    .navbar-center-spacer {
        flex: 1;
        pointer-events: none;
        visibility: hidden;
    }

    /* Hide on desktop */
    @media (min-width: 769px) {
        .navbar-center-spacer {
            display: none;
        }
    }

    /* Central Upload Button - Floating in the notch */
    .navbar-item-central {
        position: absolute !important;
        left: 50% !important;
        top: -56px !important;
        /* Lowered 2px (v=6.2) */
        /* Adjusted for deeper notch */
        /* 60% of -42px */
        margin-left: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        flex: none !important;
        pointer-events: auto !important;
        /* Remove any box-shadow that creates square effect */
        box-shadow: none !important;
        background: transparent !important;
    }

    .navbar-item-central .pc-only-icon {
        display: none !important;
    }

    .navbar-item-central .mobile-only-logo {
        display: flex !important;
    }

    /* Hide PC elements on mobile */
    @media (max-width: 768px) {
        .pc-only-icon {
            display: flex;
        }

        .mobile-only {
            display: block;
        }
    }

    .central-logo-wrapper {
        width: 73px;
        /* Reduced to ~90% (v=5.9) */
        height: 73px;
        background: #ffffff !important;
        border-radius: 50%;
        /* border: 3.5px solid #FF512F !important; REMOVED SOLID BORDER */
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 25px rgba(255, 81, 47, 0.3);
        transition: transform 0.2s ease;
        animation: navbarPulse 2s infinite ease-in-out;
        position: relative;
        /* Context for pseudo-element */
    }

    /* Rotating Dashed Border (v=6.7) */
    .central-logo-wrapper::before {
        content: "";
        position: absolute;
        inset: -4px;
        /* Border thickness */
        border-radius: 50%;
        padding: 4px;
        /* Match inset */
        background: conic-gradient(from 0deg, #FFF176, #FFB74D, #FF9800, #EF6C00, #E65100, #FFF176);
        /* Yellow to Dark Orange Loop */
        -webkit-mask:
            linear-gradient(#fff 0 0) content-box,
            repeating-conic-gradient(#000 0deg 10deg, transparent 10deg 20deg);
        /* Dashed Mask */
        mask:
            linear-gradient(#fff 0 0) content-box,
            repeating-conic-gradient(#000 0deg 10deg, transparent 10deg 20deg);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        z-index: -1;
        animation: borderSpin 3s linear infinite;
        /* Counter-Clockwise handled by reverse or keyframes */
    }

    @keyframes borderSpin {
        to {
            transform: rotate(-360deg);
        }
    }

    .navbar-item-central:hover .central-logo-wrapper {
        transform: scale(1.08) translateY(-3px);
        box-shadow:
            0 12px 25px rgba(255, 81, 47, 0.5),
            0 0 0 8px rgba(255, 81, 47, 0.1);
    }

    .central-of-logo {
        width: 40px;
        /* Scaled down 10% */
        height: auto;
        filter: none;
    }

    .navbar-item-central span {
        display: none !important;
    }



    /* Responsive adjustments */
    @media (max-width: 480px) {
        body {
            padding-bottom: 70px !important;
            /* Match navbar height */
        }

        .navbar {
            height: 52px;
            z-index: 2500 !important;
            background:
                radial-gradient(circle at 50% -5px, transparent 55px, #ffffff 56px);
            /* Deep-Bottom Notch scaled down */
        }

        .navbar-item {
            font-size: 0.42rem;
            padding: 4px 0 0 0;
        }

        .navbar-item svg {
            width: 19px !important;
            height: 19px !important;
        }

        .navbar-item-central {
            top: -62px;
            /* Adjusted for smaller wrapper */
        }

        .central-logo-wrapper {
            width: 82px;
            /* Balanced size for small screens */
            height: 82px;
            border-width: 4px !important;
            box-shadow: 0 8px 25px rgba(255, 81, 47, 0.3);
        }

        .central-of-logo {
            width: 48px !important;
            /* Scaled down from 65px */
        }
    }
}

/* Pulsating Animation for Central Logo */
@keyframes navbarPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .navbar {
        background:
            radial-gradient(circle at 50% -5px, transparent 65px, rgba(15, 23, 42, 0.98) 66px);
        /* Deep Bottom */
    }

    .central-logo-wrapper {
        border-color: #1e293b;
    }

    .navbar-item {
        color: #94a3b8;
    }

    @media (max-width: 480px) {
        .navbar {
            background:
                radial-gradient(circle at 50% -5px, transparent 55px, rgba(15, 23, 42, 0.98) 56px);
            /* Deep Bottom */
        }
    }
}

/* Custom SweetAlert Styles */
.swal-popup-custom {
    border-radius: 20px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.swal-title-custom {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    padding: 0 !important;
    margin-bottom: 10px !important;
}

.swal-text-custom {
    font-size: 0.85rem !important;
    color: #64748b !important;
}

/* Cropper Circular View */
.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}

.cropper-view-box {
    outline: 0;
    box-shadow: 0 0 0 1px #39f;
}

/* Account styles moved to style.css */