/* style.css - Hafiz Mobile Accessories Premium Styles */

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(circle at 0% 0%, #f1f5f9 0%, #cbd5e1 100%);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Hide scrollbars but keep scrolling active */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Bubble glassmorphic components */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    border-color: rgba(148, 163, 184, 0.5);
}

/* Kinetic Feedback Transitions */
.btn-premium {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1rem;
}

.btn-premium:active {
    transform: scale(0.96);
    filter: brightness(0.95);
}

/* Smooth View Transitions */
.view-section {
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.view-section.hidden {
    display: none;
    opacity: 0;
    transform: translateY(12px);
}

/* Keyframe Animations */
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-slide-up {
    animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-down {
    animation: slideDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bubble design elements */
.bubble-accent {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.12));
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

/* Navigation active tab indicator */
.active-tab {
    position: relative;
}

.active-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2.5px;
    background: #818cf8;
    border-radius: 4px;
}

/* Toast animations */
#toast-container > div {
    transform-origin: center top;
}

/* Invoice modal print styles */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-receipt-card, #printable-receipt-card * {
        visibility: visible;
    }
    #printable-receipt-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 8px;
        border: none;
        box-shadow: none;
        background: white;
    }
    #invoice-receipt-wrapper {
        overflow: visible !important;
        max-height: none !important;
        background: white !important;
    }
    .no-print {
        display: none !important;
    }
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* Input field focus effects */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Loading splash screen */
#splash-screen {
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Enhanced button hover states */
.btn-premium:hover {
    transform: translateY(-1px);
}

.btn-premium:active {
    transform: scale(0.97);
}

/* Glass card inner glow */
.glass-card {
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

/* PWA Install banner customization */
#pwa-install-banner {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
    .glass-card {
        border-radius: 1.25rem;
        padding: 0.75rem;
    }
    
    .btn-premium {
        border-radius: 0.875rem;
    }
    
    .text-sm {
        font-size: 0.8125rem;
    }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
    .pb-24 {
        padding-bottom: max(6rem, env(safe-area-inset-bottom));
    }
    
    .pt-4 {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
}

/* Dark mode support for system preference */
@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(circle at 0% 0%, #1e293b 0%, #0f172a 100%);
    }
    
    .glass-card {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(71, 85, 105, 0.5);
    }
    
    .glass-card:hover {
        border-color: rgba(71, 85, 105, 0.7);
    }
}