/* ========== MyLocal — Custom Styles ========== */

/* Alpine.js cloak — hide elements until Alpine initialises */
[x-cloak] { display: none !important; }

/* Thin custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.3);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.5);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(128, 128, 128, 0.3) transparent;
}

/* Hide scrollbar for horizontal scroll containers */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Smooth scrolling */
.scroll-smooth {
    scroll-behavior: smooth;
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect ratio for older browsers */
.aspect-video {
    aspect-ratio: 16 / 9;
}
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Tap highlight removal for mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Safe area padding for notched phones */
body {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Bottom nav safe spacing */
.pb-safe {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Story progress animation (used by story_viewer) */
@keyframes storyProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* Toast slide-in */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Pulse animation for notification badges */
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
.pulse-badge {
    animation: pulse-dot 2s infinite;
}

/* Modal backdrop */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Input focus ring consistency */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
