/* Custom Admin Styling - Conservative Fonts Only */

/* ==================== GLOBAL FONT OVERRIDE ==================== */
/* Apply conservative fonts to ALL admin elements while preserving original sizes */

/* Base font for body and main content */
body, html {
    font-family: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Admin sidebar and navigation - keep original sizes */
#nav-sidebar {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

#nav-sidebar a, #nav-sidebar li {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
    font-size: inherit;
}

/* Admin content area - keep original sizes */
#content {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

/* Headings - keep original sizes but use conservative fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

/* Text elements - keep original sizes */
p, span, div, a, li, td, th, input, select, textarea, button {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

/* Admin specific elements */
.module h2, .module h3 {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

.module caption {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

/* Form elements */
.form-row input, .form-row select, .form-row textarea {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

/* Table elements */
.results th, .results td {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

/* ==================== RIGHT SIDEBAR FILTERS ==================== */

/* Main filter container styling */
#changelist-filter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15), 0 8px 40px rgba(102, 126, 234, 0.1);
    border: none;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Filter header styling */
#changelist-filter h2 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filter section titles */
#changelist-filter h3 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter list styling */
#changelist-filter ul {
    padding: 0;
    margin: 0 0 15px 0;
    list-style: none;
}

#changelist-filter li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#changelist-filter li:last-child {
    border-bottom: none;
}

/* Filter links styling */
#changelist-filter a {
    display: block;
    padding: 10px 15px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 2px 0;
    font-weight: 500;
}

#changelist-filter a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    padding-left: 20px;
}

/* Selected filter styling */
#changelist-filter li.selected a {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 700;
    border-left: 4px solid #ffffff;
    padding-left: 16px;
}

#changelist-filter li.selected a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Filter count badges */
#changelist-filter a::after {
    float: right;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Date hierarchy styling */
.xfull {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.xfull a {
    color: #ffffff;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.xfull a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Search form enhancement */
#changelist-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

#changelist-search label {
    color: #ffffff;
    font-weight: 600;
}

#searchbar {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

#searchbar:focus {
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    outline: none;
}

/* Action buttons styling */
.submit-row {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 15px 20px;
}

.submit-row input[type="submit"],
.submit-row button {
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.submit-row input[type="submit"]:hover,
.submit-row button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #changelist-filter {
        padding: 15px;
    }
    
    #changelist-filter h2 {
        font-size: 16px;
    }
    
    #changelist-filter h3 {
        font-size: 13px;
    }
}

/* Remove filter button styling */
#changelist-filter-clear {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 15px;
    font-weight: 600;
    text-align: center;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

#changelist-filter-clear:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* Filter choice styling for better hierarchy */
.filter-choice {
    position: relative;
    padding-left: 25px;
}

.filter-choice::before {
    content: "→";
    position: absolute;
    left: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

/* Make active filters stand out more */
#changelist-filter li.selected {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    margin: 4px 0;
}

/* ==================== ENHANCED ANIMATIONS ==================== */

/* Smooth scrollbar for filter box */
#changelist-filter::-webkit-scrollbar {
    width: 8px;
}

#changelist-filter::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#changelist-filter::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

#changelist-filter::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Entry animation for filter items */
#changelist-filter li {
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation for filter items */
#changelist-filter li:nth-child(1) { animation-delay: 0.05s; }
#changelist-filter li:nth-child(2) { animation-delay: 0.1s; }
#changelist-filter li:nth-child(3) { animation-delay: 0.15s; }
#changelist-filter li:nth-child(4) { animation-delay: 0.2s; }
#changelist-filter li:nth-child(5) { animation-delay: 0.25s; }

/* Filter section animation */
#changelist-filter h3 {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Pulse effect for selected filters */
#changelist-filter li.selected a {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
}

/* ==================== BADGE ENHANCEMENTS ==================== */

/* Beautiful count badges for filter options */
#changelist-filter a[href*="?"] span {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#changelist-filter a:hover span {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.25));
    transform: scale(1.1);
}

/* ==================== HEADER ENHANCEMENTS ==================== */

/* Beautiful filter header with icon */
#changelist-filter h2::before {
    content: "🔍 ";
    font-size: 20px;
    margin-right: 8px;
    animation: rotate 3s linear infinite;
}

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

/* Section headers with better styling */
#changelist-filter h3 {
    position: relative;
    overflow: hidden;
}

#changelist-filter h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

#changelist-filter h3:hover::after {
    transform: translateX(0);
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */

@media (max-width: 768px) {
    #changelist-filter {
        position: static;
        max-height: none;
        margin-bottom: 20px;
    }
    
    #changelist-filter h2::before {
        animation: none;
    }
}
