/* Custom styles for Auswertung der Matomodaten der OpenELEC App */

/* Force reload styles for Firefox back button */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #f8f9fa !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    color: #212529 !important;
    line-height: 1.6 !important;
}

/* Ensure proper contrast and visibility */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force proper rendering for all elements */
.container, .row, .col, .card, .btn, .form-control, .alert, .badge {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.navbar-brand {
    font-weight: 600;
}

.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.alert {
    border-radius: 0.375rem;
    border: none;
}

.badge {
    font-size: 0.875em;
    padding: 0.5em 0.75em;
    color: #ffffff !important;
}

/* Ensure all badges have white text */
.bg-primary {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.bg-info {
    background-color: #0dcaf0 !important;
    color: #ffffff !important;
}

.bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.bg-dark {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Specific badge styles for visitor-development */
.badge.bg-primary {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #ffffff !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .fa-3x {
        font-size: 2em !important;
    }
}

/* Custom color scheme */
.bg-primary {
    background-color: #0d6efd !important;
}

.border-primary {
    border-color: #0d6efd !important;
}

.text-primary {
    color: #0d6efd !important;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Hover effect for clickable months */
.hover-effect:hover {
    color: #0b5ed7 !important;
    text-decoration: underline !important;
    transform: scale(1.05);
    transition: all 0.2s ease-in-out;
}

/* Filter section toggle effect */
.card-header[onclick]:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease-in-out;
}

/* Firefox back button fix - ensure proper contrast and visibility */
.navbar {
    background-color: #0d6efd !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.navbar-brand {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500 !important;
}

.navbar-nav .nav-link:hover {
    color: #e9ecef !important;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.navbar-text {
    color: #ffffff !important;
}

/* Ensure table readability */
.table {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.table th {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 600 !important;
    border-color: #dee2e6 !important;
}

.table td {
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

/* Ensure form elements are visible */
.form-label {
    color: #495057 !important;
    font-weight: 500 !important;
}

.form-control {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

.form-control:focus {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

/* Ensure buttons are properly styled */
.btn {
    font-weight: 500 !important;
    text-shadow: none !important;
    color: #ffffff !important;
}

.btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    color: #ffffff !important;
}

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: #5c636a !important;
    border-color: #565e64 !important;
    color: #ffffff !important;
}

/* Ensure all buttons have white text */
.btn-outline-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    color: #ffffff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.btn-outline-secondary {
    color: #6c757d !important;
    border-color: #6c757d !important;
    background-color: transparent !important;
}

.btn-outline-secondary:hover {
    color: #ffffff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* Specific button styles for visitor-development page */
.btn-group .btn {
    color: #ffffff !important;
}

.btn-group .btn.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

.btn-group .btn:not(.active) {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.btn-group .btn:not(.active):hover {
    background-color: #5c636a !important;
    border-color: #565e64 !important;
    color: #ffffff !important;
}

/* Ensure all button group buttons have white text */
.btn-group-toggle .btn {
    color: #ffffff !important;
}

.btn-group-toggle .btn.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

.btn-group-toggle .btn:not(.active) {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

/* Ensure any other button variants have proper contrast */
.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #157347 !important;
    border-color: #146c43 !important;
    color: #ffffff !important;
}

.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: #bb2d3b !important;
    border-color: #b02a37 !important;
    color: #ffffff !important;
}

.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
}

.btn-warning:hover {
    background-color: #ffca2c !important;
    border-color: #ffc720 !important;
    color: #212529 !important;
}

.btn-info {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #ffffff !important;
}

.btn-info:hover {
    background-color: #31d2f2 !important;
    border-color: #25cff2 !important;
    color: #ffffff !important;
}

.btn-light {
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
    color: #212529 !important;
}

.btn-light:hover {
    background-color: #f9fafb !important;
    border-color: #f9fafb !important;
    color: #212529 !important;
}

.btn-dark {
    background-color: #212529 !important;
    border-color: #212529 !important;
    color: #ffffff !important;
}

.btn-dark:hover {
    background-color: #424649 !important;
    border-color: #373b3e !important;
    color: #ffffff !important;
}

/* Ensure cards are properly styled */
.card {
    background-color: #ffffff !important;
    border-color: #dee2e6 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card-header {
    background-color: #f8f9fa !important;
    border-bottom-color: #dee2e6 !important;
    color: #495057 !important;
    font-weight: 500 !important;
}

.card-body {
    color: #212529 !important;
}

/* Ensure alerts are visible */
.alert {
    color: #212529 !important;
    border: 1px solid !important;
}

.alert-success {
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
    color: #0f5132 !important;
}

.alert-info {
    background-color: #cff4fc !important;
    border-color: #b6effb !important;
    color: #055160 !important;
}

.alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffecb5 !important;
    color: #664d03 !important;
}

.alert-danger {
    background-color: #f8d7da !important;
    border-color: #f5c2c7 !important;
    color: #842029 !important;
}

/* Force page load animation to ensure proper rendering */
@keyframes forceRender {
    0% { opacity: 0.99; }
    100% { opacity: 1; }
}

body {
    animation: forceRender 0.1s ease-out;
}

/* Ensure proper text contrast */
h1, h2, h3, h4, h5, h6 {
    color: #212529 !important;
    font-weight: 600 !important;
}

p, span, div {
    color: #212529 !important;
}

/* Ensure links are visible */
a {
    color: #0d6efd !important;
    text-decoration: none !important;
}

a:hover {
    color: #0a58ca !important;
    text-decoration: underline !important;
}

/* Ensure proper focus indicators for accessibility */
*:focus {
    outline: 2px solid #0d6efd !important;
    outline-offset: 2px !important;
}

/* Styles for visitor badges in moodle-course-details */
.visit-count-badge {
    transition: opacity 0.3s ease-in-out;
}

.visit-count-badge.excluded {
    background-color: #ffffff !important;
    color: #0d6efd !important;
    border: 2px solid #0d6efd !important;
} 