/* Custom styles for Web Data Scanner Admin UI */

/* General styles */
body { 
    padding-top: 20px; 
    padding-bottom: 50px;
}

/* Job card styling */
.job-card { 
    margin-bottom: 15px; 
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.job-card.pending:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(-45deg, #f8f9fa 25%, #ffc107 25%, #ffc107 50%, #f8f9fa 50%, #f8f9fa 75%, #ffc107 75%);
    background-size: 20px 20px;
    animation: progress-animation 1s linear infinite;
}

.job-card.processing:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(-45deg, #f8f9fa 25%, #0d6efd 25%, #0d6efd 50%, #f8f9fa 50%, #f8f9fa 75%, #0d6efd 75%);
    background-size: 20px 20px;
    animation: progress-animation 1s linear infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* Loading indicator */
#loading { 
    display: none;
}

/* Badge sizing and styling */
.badge { 
    font-size: 0.8em;
}

#api-status-badge {
    transition: background-color 0.3s ease;
}

/* Progress bar */
.progress { 
    height: 5px;
}

/* Highlight real jobs */
.real-job { 
    box-shadow: 0 0 10px rgba(0,123,255,0.3);
}

/* Nav pills styling */
.nav-pills .nav-link.active {
    background-color: #0d6efd;
}

/* Sidebar styling */
.sidebar {
    position: sticky;
    top: 20px;
}

/* Card selection styling */
.user-card, .website-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-card:hover, .website-card:hover {
    background-color: #f8f9fa;
}

.user-card.selected, .website-card.selected {
    background-color: #e7f1ff;
    border-color: #0d6efd;
}

/* Checkbox alignment */
.form-check-input.user-select, .form-check-input.website-select {
    margin-top: 0.3rem;
}

/* Scheduled job styling */
.scheduled-job {
    background-color: #f8f9fa;
    border-left: 4px solid #20c997;
}

/* Form spacing */
.form-floating {
    margin-bottom: 15px;
}

/* Content scrolling */
.scrollable-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Tab content minimum height */
.tab-content {
    min-height: 500px;
}

/* Finding Cards */
.finding-card {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.finding-card.critical {
    border-left-color: #dc3545;
}

.finding-card.high {
    border-left-color: #fd7e14;
}

.finding-card.medium {
    border-left-color: #ffc107;
}

.finding-card.low {
    border-left-color: #28a745;
}

/* Screenshot styling */
.screenshot-container {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.25rem;
    background-color: #f8f9fa;
}

.screenshot-link {
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
}

.screenshot-link:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.finding-header {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem 0.25rem 0 0;
    color: white;
}

.finding-header.critical {
    background-color: #dc3545;
}

.finding-header.high {
    background-color: #fd7e14;
}

.finding-header.medium {
    background-color: #ffc107;
    color: #212529;
}

.finding-header.low {
    background-color: #28a745;
}

/* Tabs styling */
.tab-pane {
    padding: 1rem 0;
}

/* Modal styling */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 2px solid #e9ecef;
}

/* Alert messages */
#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

#alert-container .alert {
    margin-bottom: 10px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(50px);
    animation: alert-slide-in 0.3s forwards;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@keyframes alert-slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Findings summary styling */
.findings-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.findings-count {
    display: flex;
    align-items: center;
}

.finding-badge {
    margin-right: 0.5rem;
}

/* Custom accordion styling */
.findings-accordion .accordion-button:not(.collapsed) {
    color: #0d6efd;
    background-color: #e7f1ff;
}

.findings-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Action buttons */
.action-btn {
    white-space: nowrap;
}

/* Status indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-indicator.success {
    background-color: #28a745;
}

.status-indicator.warning {
    background-color: #ffc107;
}

.status-indicator.danger {
    background-color: #dc3545;
}

.status-indicator.primary {
    background-color: #0d6efd;
}

/* URL display formatting */
.url-display {
    word-break: break-all;
    font-family: monospace;
    font-size: 0.9em;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Finding description styling */
.finding-description {
    background-color: #fff;
    padding: 1rem;
    border-radius: 0.25rem;
    border-left: 3px solid #ccc;
}

.finding-description.critical {
    border-left-color: #dc3545;
}

.finding-description.high {
    border-left-color: #fd7e14;
}

.finding-description.medium {
    border-left-color: #ffc107;
}

.finding-description.low {
    border-left-color: #28a745;
}