/* Custom styles for ERPT */

/* Enhanced navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Improved card styling */
.card {
    transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}

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

.card-header {
    font-weight: 600;
}

/* Enhanced badges */
.badge {
    font-size: 0.875em;
    font-weight: 500;
}

/* Background gradients */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #4c84ff 100%);
}

/* Map styles */
#map, #main-map, #map-editor {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: border-color 0.15s ease-in-out;
}

#map:hover, #main-map:hover, #map-editor:hover {
    border-color: var(--bs-primary);
}

/* Statistics cards */
.stats-card {
    border-left: 4px solid var(--bs-primary);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

/* Enhanced buttons */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
}

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

/* Improved table styling */
.table-hover tbody tr:hover td {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Enhanced form controls */
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Custom utility classes */
.bg-opacity-5 {
    --bs-bg-opacity: 0.05;
}

.shadow-soft {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}

/* Footer styling */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Enhanced stop cards for merge functionality */
.stop-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.stop-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stop-card.selected-primary {
    border: 3px solid #007bff !important;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
    transform: scale(1.05);
}

.stop-card.selected-secondary {
    border: 3px solid #dc3545 !important;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.4);
    transform: scale(1.05);
}

/* Status indicators */
.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.pending { background-color: #ffc107; }
.status-indicator.approved { background-color: #198754; }
.status-indicator.rejected { background-color: #dc3545; }
.status-indicator.implemented { background-color: #0d6efd; }

/* Map editor enhancements */
.editor-toolbar, .editor-sidebar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.zoom-warning {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.9);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--bs-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .container-fluid .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        margin-bottom: 0.5rem;
        border-radius: 0.375rem !important;
    }

    .editor-toolbar {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        margin-bottom: 1rem;
    }

    .editor-sidebar {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-height: none;
        margin-top: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .stats-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
    }

    .d-flex.justify-content-between > * {
        margin-bottom: 1rem;
    }

    .btn-group {
        width: 100%;
    }
}
    content: "PRIMARY";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
}

.stop-card.selected-secondary .card-body::before {
    content: "SECONDARY";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
}

.stop-card.selected-primary .card-body,
.stop-card.selected-secondary .card-body {
    position: relative;
}

#mergePanel {
    animation: slideDown 0.3s ease-out;
}

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