/* WhatsApp Business Clone - Custom Styles */

/* Hide scrollbars but allow scrolling */
::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Chat bubble styles */
.chat-bubble-sent {
    background: #D9FDD3;
    border-radius: 8px 8px 0 8px;
}

.chat-bubble-received {
    background: #FFFFFF;
    border-radius: 8px 8px 8px 0;
}

/* Search result highlight animation */
.search-result-highlight {
    animation: highlight 1.5s ease-in-out;
}

@keyframes highlight {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: #FEF3C7;
    }
}

/* Highlighted message border */
.highlighted-border {
    border: 3px solid #8B5CF6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Bounce animation delays for loading dots */
.bounce-delay-1 {
    animation-delay: 0s;
}

.bounce-delay-2 {
    animation-delay: 0.2s;
}

.bounce-delay-3 {
    animation-delay: 0.4s;
}

/* Smooth transitions */
.view-transition {
    transition: opacity 0.2s ease-in-out;
}

/* Chat list item hover states */
.chat-item {
    transition: background-color 0.15s ease;
}

.chat-item:hover {
    background-color: #f9fafb;
}

.chat-item:active {
    background-color: #f3f4f6;
}

/* Result item hover states */
.result-item {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.result-item:hover {
    background-color: #f9fafb;
}

.result-item:active {
    background-color: #f3f4f6;
}

/* Suggestion item hover states */
.suggestion-item {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f9fafb;
}

/* Voice note player styles */
.voice-note-player {
    background: #E8F5E9;
    border-radius: 8px;
    padding: 8px 12px;
}

.voice-note-progress {
    height: 4px;
    background: #C8E6C9;
    border-radius: 2px;
    overflow: hidden;
}

.voice-note-progress-bar {
    height: 100%;
    background: #25D366;
    transition: width 0.1s linear;
}

/* Payment screenshot card styles */
.payment-card {
    background: white;
    border: 2px solid #25D366;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* PDF document preview styles */
.pdf-preview {
    background: #EEF2FF;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #6366F1;
}

/* Location preview styles */
.location-preview {
    background: #FEF2F2;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #EF4444;
}

/* Unread badge */
.unread-badge {
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
}

/* Navigation item active state */
.nav-item.active {
    color: #128C7E;
}

.nav-item.active span {
    font-weight: 500;
}

/* Mobile viewport height fix */
.min-h-screen {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Prevent text selection on UI elements */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Safe area insets for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
    #header {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
    
    #bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* Responsive container */
@media (min-width: 431px) {
    #app {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
}

/* Focus styles for accessibility */
input:focus {
    outline: none;
}

button:focus-visible {
    outline: 2px solid #128C7E;
    outline-offset: 2px;
}

/* Image loading placeholder */
.img-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Truncate text with ellipsis */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Group avatar placeholder */
.group-avatar {
    background: #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Message status icons */
.message-status {
    font-size: 12px;
}

.message-status.sent {
    color: #9CA3AF;
}

.message-status.delivered {
    color: #9CA3AF;
}

.message-status.read {
    color: #3B82F6;
}


