/* Custom styles for Workflow */

/* Override minimal necessary Bootstrap styles */
:root {
    --project-primary: var(--bs-primary);
    --project-success: var(--bs-success);
    --project-warning: var(--bs-warning);
    --project-danger: var(--bs-danger);
    --project-info: var(--bs-info);
}

/* Body and general layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

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

/* Progress bar custom styling */
.progress {
    height: 0.75rem;
    border-radius: 0.5rem;
}

.progress-bar {
    border-radius: 0.5rem;
    transition: width 0.3s ease;
}

/* Status badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* List group items */
.list-group-item {
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.125);
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
}

.list-group-item:last-child {
    margin-bottom: 0;
}

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

.is-invalid {
    border-color: var(--project-danger) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-danger-rgb), 0.25) !important;
}

/* Button enhancements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    border-radius: 0.25rem;
}

/* Dropdown menu styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    border-radius: 0.5rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.dropdown-item.active {
    background-color: var(--project-primary);
}

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid rgba(var(--bs-border-color-rgb), 0.125);
}

.modal-footer {
    border-top: 1px solid rgba(var(--bs-border-color-rgb), 0.125);
}

/* Navigation bar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 > * {
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-2 > *:last-child {
        margin-bottom: 0;
    }
}

/* Animation and transitions */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Loading states */
.btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn.loading::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom utility classes */
.text-decoration-line-through {
    text-decoration: line-through !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--project-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--bs-border-color);
    }
    
    .btn-outline-primary,
    .btn-outline-secondary,
    .btn-outline-success,
    .btn-outline-warning,
    .btn-outline-danger {
        border-width: 2px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
