/* Custom styles for Venneu application */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
}

/* Card styling */
.card {
    transition: transform 0.2s;
}

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

/* Map styling */
#map {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Results list styling */
.result-item {
    border-left: 4px solid #0d6efd;
    background-color: #f8f9fa;
    transition: all 0.2s;
}

.result-item:hover {
    border-left-color: #0a58ca;
    background-color: #e9ecef;
}

.distance-badge {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Loading spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Form validation */
.was-validated .form-control:invalid {
    border-color: #dc3545;
}

.was-validated .form-control:valid {
    border-color: #198754;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    #map {
        height: 300px !important;
    }
}

/* Navbar / offcanvas tweaks for mobile */
.navbar-brand { font-weight: 600; }
.offcanvas-body .nav-link { padding: 0.5rem 0; }
.offcanvas .dropdown-menu { position: static; float: none; }

/* Candidates table small viewport tweaks */
@media (max-width: 576px) {
    #candidatesTable thead { display: none; }
    #candidatesTable, #candidatesTable tbody, #candidatesTable tr, #candidatesTable td {
        display: block;
        width: 100%;
    }
    #candidatesTable tr { margin-bottom: 0.75rem; border: 1px solid #e9ecef; padding: 0.5rem; border-radius: 0.375rem; }
    #candidatesTable td { padding: 0.25rem 0.5rem; }
    #candidatesTable td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
    }
}

/* Sortable header visuals */
th.sortable { cursor: pointer; }
th.sortable .sort-indicator { font-size: 0.8rem; }

/* Animation for results */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}
