/* EGP Scanner - Custom Styles */

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color;
    transition-duration: 150ms;
    transition-timing-function: ease-in-out;
}

/* Score badges */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25rem;
}

.score-high {
    background-color: #dcfce7;
    color: #166534;
}
.dark .score-high {
    background-color: #064e3b;
    color: #6ee7b7;
}

.score-medium {
    background-color: #fef9c3;
    color: #854d0e;
}
.dark .score-medium {
    background-color: #713f12;
    color: #fde047;
}

.score-low {
    background-color: #fee2e2;
    color: #991b1b;
}
.dark .score-low {
    background-color: #7f1d1d;
    color: #fca5a5;
}

.score-none {
    background-color: #f3f4f6;
    color: #6b7280;
}
.dark .score-none {
    background-color: #374151;
    color: #9ca3af;
}

/* Result cards */
.result-card {
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.result-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-card.score-border-high {
    border-left-color: #22c55e;
}

.result-card.score-border-medium {
    border-left-color: #eab308;
}

.result-card.score-border-low {
    border-left-color: #ef4444;
}

.result-card.score-border-none {
    border-left-color: #9ca3af;
}

/* Progress animation */
@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Pagination */
.page-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dark .page-btn {
    border-color: #4b5563;
}

.page-btn:hover {
    background-color: #eff6ff;
}

.dark .page-btn:hover {
    background-color: #1e3a8a;
}

.page-btn.active {
    background-color: #1d4ed8;
    color: white;
    border-color: #1d4ed8;
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Category tags */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #eff6ff;
    color: #1e40af;
}

.dark .category-tag {
    background-color: #1e3a8a;
    color: #93c5fd;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

.dark ::-webkit-scrollbar-thumb {
    background-color: #4b5563;
}

/* Custom checkbox styling */
input[type="checkbox"] {
    accent-color: #2563eb;
}

/* AI Settings Panel */
#ai-panel-toggle:hover {
    background-color: rgba(249, 250, 251, 0.5);
}
.dark #ai-panel-toggle:hover {
    background-color: rgba(55, 65, 81, 0.5);
}

#ai-panel-body select,
#ai-panel-body input {
    font-size: 0.875rem;
}

#ai-status-badge {
    transition: all 0.2s ease;
}

/* LLM Reason styling */
.llm-reason {
    padding: 0.25rem 0.5rem;
    background-color: #f0fdf4;
    border-radius: 0.375rem;
    line-height: 1.5;
}
.dark .llm-reason {
    background-color: rgba(6, 78, 59, 0.2);
}

/* LLM Level Tag */
.llm-level-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background-color: #f3e8ff;
    color: #7c3aed;
    font-weight: 600;
}
.dark .llm-level-tag {
    background-color: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
}

/* Test connection button loading state */
#btn-test-connection:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Scan button disabled state */
#btn-scan.opacity-50 {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading shimmer */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.dark .shimmer {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
}
