/* PromptPad - Apple Style UI Framework 
    Version: 1.0
    Author: Laconic Medya
*/

:root {
    /* Colors */
    --apple-gray: #f5f5f7;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --primary-blue: #007aff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;

    /* Layout */
    --sidebar-width: 18rem;
    --mobile-nav-height: 85px;
}

/* 1. Reset & Base Styles */
body {
    background-color: var(--apple-gray);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 2. Glassmorphism Effects */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
}

/* 3. Main Layout Components */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    transition: all 0.3s ease;
}

/* 4. Desktop Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 5. Mobile Components (Hidden by default) */
.mobile-header {
    display: none;
}

/* 6. Animations & Interactive Elements */
.qr-popup {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-trigger:hover .qr-popup {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.notification-badge {
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(249, 115, 22, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}

/* 7. Market Buttons (App Store / Play Store Style) */
.market-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.market-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 8. Fixed Footer (Desktop Only) */
.fixed-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 40;
    padding: 1.2rem 2.5rem;
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.animate-footer-fixed {
    animation: footerRise 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes footerRise {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 9. Responsive Adjustments (Mobile - Tablet) */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    /* Mobile Header Display */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        z-index: 1000;
        padding: 0 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Fixed Bottom Navigation (Replacing Sidebar) */
    .sidebar {
        width: 100% !important;
        height: var(--mobile-nav-height) !important;
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        border-radius: 25px 25px 0 0;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
        padding: 0 1rem;
        display: flex !important;
    }

    /* Hide Desktop Elements on Mobile */
    .sidebar>div:first-child>div:first-child,
    .user-box,
    .sidebar p.uppercase,
    .notifications-wrapper,
    .desktop-app-banner,
    .fixed-footer {
        display: none !important;
    }

    /* Mobile Navigation Links */
    .sidebar nav {
        flex-direction: row !important;
        justify-content: space-between !important;
        width: 100%;
        align-items: center;
    }

    .sidebar nav a {
        flex-direction: column !important;
        gap: 4px !important;
        padding: 8px 0 !important;
        flex: 1;
        background: transparent !important;
    }

    .sidebar nav a span {
        font-size: 10px !important;
        font-weight: 700;
    }

    /* Space for header and nav */
    .main-content {
        padding-top: 85px !important;
        padding-bottom: 100px !important;
    }
}