/* Social Emaus — Custom Styles */

:root {
    --brand: #3ab8b8;
    --brand-dark: #2d9191;
    --brand-light: #e6f5f5;
}

* { scrollbar-width: thin; scrollbar-color: #d1d5db transparent; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

html { scroll-behavior: smooth; }

body.dark-mode {
    --tw-bg-opacity: 1;
}

/* Safe area for mobile bottom nav */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

/* Feed body padding for bottom nav on mobile */
@media (max-width: 1023px) {
    body { padding-bottom: 70px; }
}

/* Post card animations */
.post-card {
    transition: background-color 0.15s ease;
}

/* Like animation */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.heart-animate {
    animation: heartBeat 0.35s ease-in-out;
}

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

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Compose modal backdrop animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#compose-modal {
    animation: fadeIn 0.2s ease-out;
}

/* Image hover effect */
.post-card img[onclick] {
    transition: opacity 0.2s ease;
}
.post-card img[onclick]:hover {
    opacity: 0.9;
}

/* Profile cover gradient overlay */
.profile-cover-overlay {
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.3) 100%);
}

/* Loading skeleton */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Dark mode overrides */
.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200px 100%;
}

/* Focus visible styles */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Notification badge pulse */
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Line clamp utility */
.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;
}

/* Hashtag/mention links in post content */
.post-content a {
    color: var(--brand);
    font-weight: 500;
    text-decoration: none;
}
.post-content a:hover {
    text-decoration: underline;
}

/* Textarea auto-resize feel */
textarea {
    field-sizing: content;
    min-height: 2.5rem;
}

/* Dark mode toggle smooth transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}
