/* General Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* FontAwesome Icons Fix */
.fas, .fa, .far, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
}

/* Ensure icons are visible in buttons */
.btn i {
    pointer-events: none;
    margin-right: 4px;
}

/* Action buttons styling */
.btn-group .btn {
    margin-right: 2px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Icon fallback system */
.icon-fallback {
    display: none;
    font-size: 14px;
}

/* Show fallback if FontAwesome icon is not visible */
.btn i.fas:empty + .icon-fallback,
.btn i.fa:empty + .icon-fallback {
    display: inline;
}

.btn i.fas + .icon-fallback,
.btn i.fa + .icon-fallback {
    display: none;
}

/* Force show fallback if FontAwesome doesn't load */
.no-fontawesome .btn i.fas,
.no-fontawesome .btn i.fa {
    display: none !important;
}

.no-fontawesome .btn .icon-fallback {
    display: inline !important;
}

/* Ensure buttons have minimum content */
.btn:empty::after {
    content: "⚙️";
    font-size: 14px;
}

/* Specific fallbacks for common actions */
.btn[title*="Detail"]:not(:has(.icon-fallback))::after {
    content: "👁️";
}

.btn[title*="Upravit"]:not(:has(.icon-fallback))::after {
    content: "✏️";
}

.btn[title*="Smazat"]:not(:has(.icon-fallback))::after {
    content: "🗑️";
}

.btn[title*="Řidič"]:not(:has(.icon-fallback))::after {
    content: "🚛";
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

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

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.125);
    padding: 1rem;
}

.card-title {
    margin-bottom: 0;
    font-weight: 600;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

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

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

/* Forms */
.form-control {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

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

/* Alerts */
.alert {
    border: none;
    border-radius: 0.375rem;
    padding: 1rem;
}

/* Dashboard Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
}

.card.bg-primary {
    background-color: #0d6efd !important;
}

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

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

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

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid rgba(0,0,0,.125);
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        margin-bottom: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

/* Drag and Drop Styles */
.drag-handle {
    cursor: grab;
    color: #6c757d;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: #495057;
}

.drag-handle:active {
    cursor: grabbing;
}

.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drag-placeholder {
    background-color: #e9ecef;
    border: 2px dashed #6c757d;
    opacity: 0.5;
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    background-color: #f8f9fa;
}

.list-group-item.dragging {
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
} 