/* Mobian Shared Styles */

/* ================================
   Base & Typography
   ================================ */
body, html {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: contain;
}

.stat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ================================
   Animations
   ================================ */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Transitions */
.bar-fill {
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================================
   Cards
   ================================ */
.ad-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-card:hover {
    transform: scale(1.03);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Ad Card Thumbnail - ensure proper sizing without cropping */
.ad-card .aspect-\[9\/16\] {
    aspect-ratio: 9 / 16;
}

.ad-card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ================================
   Video Overlay / Modal
   ================================ */
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.video-overlay.hidden {
    display: none;
}

/* ================================
   Form Elements
   ================================ */

/* Custom Select Dropdown Arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

select option {
    background: #111;
    color: white;
}

/* Remove search cancel button */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

/* Range slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    outline: none;
    accent-color: #2563eb;
    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    margin-top: -4px;
}

input[type=range]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border: none;
}

/* Toggle Switch */
.toggle-checkbox:checked {
    background-color: #2563eb;
    right: 0;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #2563eb;
}

.toggle-checkbox:checked + .toggle-label .toggle-dot {
    transform: translateX(100%);
}

/* ================================
   Scrollbar
   ================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ================================
   Utility Classes
   ================================ */
.break-inside-avoid {
    break-inside: avoid;
}

/* ================================
   Focus States (Accessibility)
   ================================ */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 640px) {
    header {
        padding: 0.75rem 1rem;
    }
}

/* ================================
   Trends Page Specific
   ================================ */

/* Time period label on stat cards */
.time-period-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.25rem;
}

/* Date range display under filter */
#date-range-display {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.25rem;
}