/* === POSApp MobileWeb — Custom Styles === */

/* Logo spin animation */
@keyframes logo-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-logo {
    animation: logo-spin 4s linear infinite;
}

/* Pulse scale animation for logo */
@keyframes logo-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.animate-logo-pulse {
    animation: logo-pulse 2s ease-in-out infinite;
}

/* Bounce animation */
@keyframes bounce-logo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-bounce-logo {
    animation: bounce-logo 1.5s ease-in-out infinite;
}

/* Glow effect for config subscription */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px #ec4913, 0 0 10px #ec4913, 0 0 15px #ec4913; }
    50% { box-shadow: 0 0 10px #ec4913, 0 0 20px #ec4913, 0 0 30px #ec4913; }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Safe area bottom padding (for notched devices) */
.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* QR Scanner scan line animation */
.scan-line {
    animation: scan 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    background: linear-gradient(to bottom, transparent, #ec4913, transparent);
}

@keyframes scan {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(300px); opacity: 0; }
}

/* Pulse animation for active order status */
@keyframes pulse-primary {
    0%, 100% { box-shadow: 0 0 0 0 rgba(236, 73, 19, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(236, 73, 19, 0); }
}

.pulse-primary {
    animation: pulse-primary 2s ease-in-out infinite;
}

/* Circular progress ring animation */
@keyframes progress-ring {
    from { stroke-dashoffset: 283; }
}

/* Fade in animation */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.4s ease-out forwards;
}

/* Stagger delay utilities */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Smooth page transitions */
html {
    scroll-behavior: smooth;
}

/* Blazor error boundary */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 0.5rem;
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Custom radio/checkbox styles to match theme */
input[type="radio"]:checked {
    background-color: #ec4913;
    border-color: #ec4913;
}

input[type="checkbox"]:checked {
    background-color: #ec4913;
    border-color: #ec4913;
}

/* Custom scrollbar for webkit (thin, themed) */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: #221510;
}
::-webkit-scrollbar-thumb {
    background: #3d261e;
    border-radius: 2px;
}

/* Pulse ring effect for order tracking */
.pulse-ring {
    position: relative;
}
.pulse-ring::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    border-radius: 50%;
    background-color: rgba(236, 73, 19, 0.4);
    animation: pulse-ring-anim 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: -1;
}

@keyframes pulse-ring-anim {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Line clamp utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* === AI Chat Widget Animations === */

@keyframes slide-up {
    0% { transform: translateY(20px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.animate-slide-up {
    animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(236, 73, 19, 0.4), 0 0 20px rgba(236, 73, 19, 0.2); }
    50% { box-shadow: 0 0 20px rgba(236, 73, 19, 0.6), 0 0 30px rgba(236, 73, 19, 0.4); }
}

.animate-pulse-glow {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes fade-in {
    0% { opacity: 0; transform: scale(0.8) rotate(-10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.animate-fade-in {
    animation: fade-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.4s ease-out forwards;
}
