/* Custom styles for PSI TV Network mirror */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Staging banner styling */
.alert-warning {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border: none;
    color: white;
    font-weight: bold;
}

/* Content wrapper for extracted text */
.content-wrapper {
    line-height: 1.6;
    font-size: 1.1rem;
}

.content-wrapper p {
    margin-bottom: 1rem;
}

.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Card styling improvements */
.card {
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Navigation improvements */
.navbar-brand {
    font-weight: bold;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Link styling for mirror paths */
.list-group-item-action {
    transition: all 0.2s ease-in-out;
}

.list-group-item-action:hover {
    background-color: var(--bs-secondary);
}

/* Admin dashboard styling */
.badge {
    font-size: 0.8rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    /* Move UserWay accessibility widget to bottom on mobile to avoid covering hamburger menu */
    #userway_p2,
    .userway_buttons_wrapper {
        top: auto !important;
        bottom: 20px !important;
        right: 20px !important;
    }
}

/* Core Web Vitals optimizations */
.container {
    contain: layout style paint;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus,
a:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Dropdown menu dark theme fix and hover activation */
.dropdown-menu {
    background-color: #212529;
    border: 1px solid #404448;
    display: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    color: #fff;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #404448;
    color: #fff;
}

.dropdown-divider {
    border-color: #404448;
}

/* Show dropdown on hover */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}
