/* Hlavní styly pro maturitní četbu */

:root {
    --primary-color: #4a90e2;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

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

.book-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #dee2e6;
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.book-card .card-title {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.book-card .card-text {
    font-size: 0.85rem;
}

.position-sticky {
    position: -webkit-sticky;
    position: sticky;
}

.list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

.badge {
    font-size: 0.7rem;
    margin-right: 0.25rem;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.card-footer {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0,0,0,.125);
}

.alert-info {
    border-color: #b8daff;
    background-color: #d1ecf1;
}

/* Responzivní úpravy */
@media (max-width: 768px) {
    .position-sticky {
        position: static;
    }
    
    .book-card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* Formulářové styly */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
}

/* Animace pro HTMX */
.htmx-request {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-indicator {
    display: none;
}

/* Tooltip styly */
.tooltip {
    font-size: 0.8rem;
}

/* Sticky header pro selection panel */
@media (min-width: 992px) {
    .position-sticky {
        top: 1.5rem;
    }
}

/* Přizpůsobení pro admin template */
.admin-export-section {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.admin-export-section h3 {
    color: #495057;
    margin-bottom: 1rem;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid #f3f3f3;
    border-top: 0.25em solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
