/* Custom styling, animations, and variables for Ospora */

html {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background-color: #080C14;
}

body {
    background-color: #080C14;
    overflow-x: hidden;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
}

#screen-splash {
    min-height: 100%;
}

/* Custom fonts styling override */
h1, h2, h3, h4, .font-golos {
    font-family: 'Golos Text', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* Animations */
@keyframes scan {
    0% {
        top: 0%;
        opacity: 0.8;
    }
    50% {
        top: 100%;
        opacity: 1;
    }
    100% {
        top: 0%;
        opacity: 0.8;
    }
}

.animate-scan {
    animation: scan 3s infinite linear;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 8s infinite ease-in-out;
}

/* Application ticker */
.application-ticker {
    align-items: center;
    min-height: 2.5rem;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: rgba(17, 24, 39, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.application-ticker--desktop {
    border-radius: 9999px;
    padding: 0 0.875rem;
}

.application-ticker--mobile {
    display: flex;
    border-radius: 0.875rem;
    padding: 0 0.75rem;
}

.ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ticker-track {
    display: flex;
    width: max-content;
    align-items: center;
    animation: ticker-scroll var(--ticker-duration, 28s) linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.ticker-group {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    padding-right: 1.25rem;
    flex: 0 0 auto;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    color: #D1D5DB;
    font-size: 0.6875rem;
    font-weight: 700;
}

.ticker-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    background: #3B82F6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.12);
    flex: 0 0 auto;
}

.ticker-item--won .ticker-dot,
.ticker-item--document_generated .ticker-dot {
    background: #10B981;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.12);
}

@keyframes ticker-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(calc(-1 * var(--ticker-distance, 50%)), 0, 0);
    }
}

.mobile-bottom-dock {
    background: linear-gradient(to top, #080C14 78%, rgba(8, 12, 20, 0));
}

/* View transitions fallbacks & custom morph effects */
.active-view {
    display: flex !important;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Soft Edge Fade Content Masking for scrollable lists */
.soft-fade-mask {
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* Custom Scrollbar for premium feeling */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: #1F2937;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3B82F6;
}

/* Glassmorphism components */
.glass-panel {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hide scrollbar utility for cleaner viewports */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

@media (max-width: 1023px) {
    #screen-splash {
        position: fixed;
        min-height: 100dvh;
        width: 100%;
        max-width: 100%;
    }

    #app-body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .mobile-bottom-dock {
        position: sticky;
        bottom: 0;
        z-index: 30;
        padding-top: 0.875rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .mobile-bottom-dock {
        background: none;
    }
}
