/* Custom styles for ClarityAI web interface */

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

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Custom scrollbar for dark mode */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Journal entry card hover effects */
.journal-entry-card {
    transition: all 0.3s ease;
}

.journal-entry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Tab active state */
.tab-btn.active {
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
}

/* Gem card hover effects */
.gem-card {
    transition: all 0.2s ease;
}

.gem-card:hover {
    transform: translateY(-1px);
}

/* Floating Action Button animations */
#fab {
    transform: translateY(0);
    transition: all 0.3s ease;
}

#fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

/* Bottom sheet animations */
.bottom-sheet-enter {
    transform: translateY(100%);
}

.bottom-sheet-enter-active {
    transform: translateY(0);
    transition: transform 0.3s ease-out;
}

.bottom-sheet-exit {
    transform: translateY(0);
}

.bottom-sheet-exit-active {
    transform: translateY(100%);
    transition: transform 0.2s ease-in;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Input focus styles */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.5);
}

/* Button ripple effect */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

button:active::before {
    width: 100px;
    height: 100px;
}

/* Badge animations */
.badge-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Glass effect for cards */
.glass {
    background: rgba(55, 65, 81, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Search highlight */
.search-highlight {
    background: rgba(14, 165, 233, 0.3);
    padding: 1px 2px;
    border-radius: 2px;
}

/* Responsive design */
@media (max-width: 640px) {
    .main-screen {
        padding-bottom: 80px;
    }
    
    .fab {
        bottom: 88px;
        right: 16px;
    }
}

/* Dark mode specific adjustments */
.dark {
    color-scheme: dark;
}

.dark .bg-gray-750 {
    background-color: #334155;
}

/* Text selection */
::selection {
    background: rgba(14, 165, 233, 0.3);
}

/* Focus indicators for accessibility */
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Smooth page transitions */
.screen-transition {
    animation: fadeSlideIn 0.3s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Empty state illustration */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

/* Status indicators */
.status-online {
    position: relative;
}

.status-online::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #10b981;
    border: 2px solid #1f2937;
    border-radius: 50%;
}

/* Progress indicators */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.3s ease;
}