/* Custom styles for the Sejm MP Database application */

/* Import Google Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Global variables */
:root {
    --primary-gradient: linear-gradient(135deg, #0d4377 0%, #38bdf8 100%);
    --card-gradient: linear-gradient(135deg, var(--bs-dark-bg) 0%, #0f3854 100%);
    --glass-background: rgba(13, 17, 23, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --animation-duration: 0.3s;
    
    /* Ciemny motyw - domyślny */
    --body-bg: #121820;
    --body-color: #e9ecef;
    --card-bg: rgba(30, 41, 59, 0.5);
    --card-border: rgba(255, 255, 255, 0.1);
    --form-bg: rgba(30, 41, 59, 0.7);
    --form-border: rgba(255, 255, 255, 0.1);
    --pre-bg: rgba(13, 17, 23, 0.7);
    --pre-border: rgba(255, 255, 255, 0.1);
    --nav-bg: #212529;
    --page-link-bg: rgba(30, 41, 59, 0.7);
    --footer-bg: #212529;
}

/* Jasny motyw */
[data-bs-theme="light"] {
    --primary-gradient: linear-gradient(135deg, #0d6efd 0%, #38bdf8 100%);
    --card-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --glass-background: rgba(249, 250, 251, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    
    --body-bg: #f8f9fa;
    --body-color: #212529;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.1);
    --form-bg: rgba(255, 255, 255, 0.9);
    --form-border: rgba(0, 0, 0, 0.1);
    --pre-bg: rgba(240, 240, 240, 0.7);
    --pre-border: rgba(0, 0, 0, 0.1);
    --nav-bg: #f8f9fa;
    --page-link-bg: rgba(255, 255, 255, 0.8);
    --footer-bg: #f8f9fa;
}

/* Base styles */
body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    line-height: 1.5;
    letter-spacing: -0.01em;
    font-size: 0.95rem;
    background-color: var(--body-bg) !important;
    color: var(--body-color);
    max-width: 1280px;
    margin: 0 auto;
}

/* Card styling with modern effects */
.mp-card {
    transition: all var(--animation-duration) ease;
    height: 100%;
    overflow: hidden;
    border-radius: 12px !important;
}

.mp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--bs-info) !important;
}

/* Modernized MP photo styling */
.mp-photo {
    width: 100%;
    height: 160px; /* Zmniejszona wysokość */
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto 15px; /* Mniejszy margines */
    display: block;
    transition: transform var(--animation-duration) ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Zapytania mediów dla różnych rozmiarów ekranów */
@media (max-width: 576px) {
    .mp-photo {
        height: 140px; /* Jeszcze mniejsza wysokość na małych urządzeniach */
    }
}

@media (min-width: 992px) {
    .mp-photo {
        height: 180px; /* Większa wysokość na dużych ekranach */
    }
}

.mp-photo:hover {
    transform: scale(1.03);
}

/* Detail photo styling */
.mp-detail-photo {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: transform var(--animation-duration) ease;
}

.mp-detail-photo:hover {
    transform: scale(1.02);
}

/* Glassmorphism effects */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Cards styling */
.card {
    transition: all var(--animation-duration) ease;
    overflow: hidden;
}

.card.bg-gradient {
    background: var(--card-gradient);
}

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

/* Filter section styling */
.filter-section {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
}

/* Dodatkowe style dla jasnego motywu */
html[data-bs-theme="light"] .filter-section,
html[data-bs-theme="light"] .api-endpoint {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

/* Form controls */
.form-control, .form-select {
    background-color: var(--form-bg) !important;
    border: 1px solid var(--form-border) !important;
    border-radius: 8px;
    transition: all var(--animation-duration) ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-info) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.25) !important;
}

/* Buttons styling */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    transition: all var(--animation-duration) ease;
}

.btn-info {
    background: var(--primary-gradient);
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* API documentation styling */
.api-endpoint {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
}

.api-endpoint h5 {
    color: var(--bs-info);
    margin-bottom: 1rem;
}

pre {
    background-color: var(--pre-bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--pre-border);
}

/* Pagination styling enhancement */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    background-color: var(--page-link-bg);
    border-color: var(--form-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all var(--animation-duration) ease;
}

.pagination .page-link:hover {
    background-color: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
}

/* Dodatkowe style responsywne */
@media (max-width: 576px) {
    /* Zmniejszenie marginesów i paddingów na małych urządzeniach */
    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Mniejszy nagłówek na urządzeniach mobilnych */
    h1, .h1 {
        font-size: 1.75rem !important;
    }
    
    h2, .h2 {
        font-size: 1.5rem !important;
    }
    
    /* Mniejsze przyciski na małych ekranach */
    .btn {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem !important;
        font-size: 1rem !important;
    }
    
    /* Zmniejszenie paddingów kart */
    .card-header, .card-body, .card-footer {
        padding: 0.75rem !important;
    }
    
    /* Dostosowanie paginacji */
    .pagination .page-link {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.875rem !important;
    }
}

/* Quiz styling */
.answer-choice {
    margin-bottom: 10px;
}

.quiz-feedback {
    font-size: 1.2rem;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.5s;
}

.feedback-correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.btn-next {
    margin-top: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

/* Theme toggle styles */
#theme-toggle {
    width: 32px;
    height: 32px;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: rotate(15deg);
}

/* Domyślnie pokazujemy ikonę księżyca (dla ciemnego motywu) */
html[data-bs-theme="dark"] .dark-icon {
    display: inline-block;
}

html[data-bs-theme="dark"] .light-icon {
    display: none;
}

/* W jasnym motywie zamieniamy ikony */
html[data-bs-theme="light"] .dark-icon {
    display: none;
}

html[data-bs-theme="light"] .light-icon {
    display: inline-block;
}

/* Style dla jasnego motywu */
html[data-bs-theme="light"] {
    --bs-body-color: #212529;
    --bs-body-bg: #f8f9fa;
}

/* Jasny motyw - kolory menu */
html[data-bs-theme="light"] .navbar {
    background-color: #f0f4f8 !important;
    border-bottom-color: #0d6efd !important;
}

html[data-bs-theme="light"] .navbar-dark {
    --bs-navbar-color: #343a40 !important;
    --bs-navbar-hover-color: #0d6efd !important;
    --bs-navbar-active-color: #0d6efd !important;
}

html[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link {
    color: #343a40 !important;
}

html[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link:hover,
html[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link.active {
    color: #0d6efd !important;
}

html[data-bs-theme="light"] .navbar-dark .navbar-brand {
    color: #0d6efd !important;
}

html[data-bs-theme="light"] .navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Jasny motyw - stopka */
html[data-bs-theme="light"] footer {
    background-color: #f0f4f8 !important;
    border-top-color: #0d6efd !important;
    color: #343a40 !important;
}

/* Jasny motyw - karty i elementy */
html[data-bs-theme="light"] .card {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.125) !important;
    color: #212529 !important;
}

html[data-bs-theme="light"] .mp-card {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

html[data-bs-theme="light"] .mp-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border-color: #0d6efd !important;
}

html[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
}

html[data-bs-theme="light"] .dropdown-item {
    color: #343a40 !important;
}

html[data-bs-theme="light"] .dropdown-item:hover {
    background-color: #e9ecef !important;
    color: #0d6efd !important;
}

html[data-bs-theme="light"] .dropdown-divider {
    border-top-color: #e9ecef !important;
}

/* Jasny motyw - elementy formularzy */
html[data-bs-theme="light"] .form-control,
html[data-bs-theme="light"] .form-select {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

html[data-bs-theme="light"] pre {
    background-color: #f1f3f5 !important;
    border-color: #dee2e6 !important;
    color: #212529 !important;
}

html[data-bs-theme="light"] .pagination .page-link {
    background-color: #ffffff !important;
    border-color: #dee2e6 !important;
    color: #0d6efd !important;
}

html[data-bs-theme="light"] .pagination .page-link:hover {
    background-color: #e9ecef !important;
}

html[data-bs-theme="light"] .btn-outline-info {
    color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
}

html[data-bs-theme="light"] .btn-outline-info:hover {
    color: #fff !important;
    background-color: #0dcaf0 !important;
}

html[data-bs-theme="light"] .text-info {
    color: #0d6efd !important;
}
