/* ============================================================
   ByteLens — Custom Styles & Animations
   Tailwind handles all utility styling via CDN.
   This file is for custom keyframes, transitions, and 
   overrides that Tailwind utility classes can't cover.
   ============================================================ */

/* --- Gallery Card Entrance Animation --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out both;
}

/* --- Chat Panel Slide Animation --- */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.animate-slideInRight {
    animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slideOutRight {
    animation: slideOutRight 0.3s cubic-bezier(0.7, 0, 0.84, 0) both;
}

/* --- Profile Modal Entrance --- */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scaleIn {
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Notification Badge Pulse --- */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.animate-badgePulse {
    animation: badgePulse 2s ease-in-out infinite;
}

/* --- Message Bubble Entrance --- */
@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-messageIn {
    animation: messageIn 0.25s ease-out both;
}

/* --- Typing Indicator Dots --- */
@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.typing-dot:nth-child(1) { animation: typingDot 1.4s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation: typingDot 1.4s ease-in-out 0.2s infinite; }
.typing-dot:nth-child(3) { animation: typingDot 1.4s ease-in-out 0.4s infinite; }

/* --- Custom Scrollbar for Chat --- */
.chat-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.chat-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.chat-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.3);
    border-radius: 20px;
}

.chat-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(148, 163, 184, 0.5);
}

/* --- Vault Panel Slide Animation (from left) --- */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.animate-slideInLeft {
    animation: slideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slideOutLeft {
    animation: slideOutLeft 0.35s cubic-bezier(0.7, 0, 0.84, 0) both;
}

/* --- Vault Photo Card --- */
.vault-photo-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vault-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.vault-photo-card img {
    transition: transform 0.5s ease;
}

.vault-photo-card:hover img {
    transform: scale(1.05);
}

/* --- Vault Select Overlay --- */
.vault-select-overlay {
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.15);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.vault-photo-card.select-mode .vault-select-overlay {
    opacity: 1;
    pointer-events: auto;
}

.vault-photo-card.selected {
    ring: 3px solid #3b82f6;
    outline: 3px solid #3b82f6;
    outline-offset: -3px;
}

.vault-photo-card.selected .vault-select-overlay {
    background: rgba(59, 130, 246, 0.25);
    opacity: 1;
}

/* --- Vault Checkbox --- */
.vault-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid white;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 5;
    opacity: 0;
    transform: scale(0.8);
}

.vault-photo-card.select-mode .vault-checkbox,
.vault-photo-card:hover .vault-checkbox {
    opacity: 1;
    transform: scale(1);
}

.vault-photo-card.selected .vault-checkbox {
    background: #3b82f6;
    border-color: #3b82f6;
    opacity: 1;
    transform: scale(1);
}

/* --- Upload Progress Bar --- */
.vault-upload-progress {
    height: 4px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.vault-upload-progress-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

/* --- Vault Status Badge --- */
.vault-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    z-index: 5;
}

.vault-status-private {
    background: rgba(30, 41, 59, 0.7);
    color: #94a3b8;
}

.vault-status-selling {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* --- Vault Empty State Animation --- */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

.vault-empty-icon {
    animation: float 3s ease-in-out infinite;
}

/* --- Vault Photo Entrance --- */
@keyframes vaultPhotoIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-vaultPhotoIn {
    animation: vaultPhotoIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Vault Scrollbar --- */
.vault-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.vault-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.vault-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.25);
    border-radius: 20px;
}

.vault-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(148, 163, 184, 0.45);
}

/* --- Profile Social Link Hover --- */
.social-link-item {
    transition: all 0.2s ease;
}

.social-link-item:hover {
    transform: translateX(4px);
}
