/* =============================================================================
   EVALUATION_DASHBOARD.CSS - Template Grid Style Replication
   ============================================================================= 
   This file recreates the exact template_grid.js styles for the Evaluation Section
   Matches: min-h-screen, gradient backgrounds, modern card design, sticky elements
   */

/* Base dashboard container with template_grid.js styling */
.evaluation-dashboard-container {
    display: none;
    position: relative;
    z-index: 100;
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
    color: #111827; /* text-gray-900 */
    padding-top: 2.4rem; /* Add top padding to move the entire container down - 80% of 3rem */
}

.evaluation-dashboard-container.visible {
    display: block !important;
}

/* Remove the hidden class when dashboard is active */
.evaluation-dashboard-container:not(.hidden) {
    display: block !important;
}

/* Utility classes matching template_grid.js Tailwind structure - scaled to 80% */
.px-2-5 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-0\.5 { padding-top: 0.1rem; padding-bottom: 0.1rem; }
.py-1 { padding-top: 0.2rem; padding-bottom: 0.2rem; }
.py-1-5 { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.py-1\.5 { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.py-2 { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.py-3 { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.py-4 { padding-top: 0.8rem; padding-bottom: 0.8rem; }
.py-6 { padding-top: 1.2rem; padding-bottom: 1.2rem; }
.py-8 { padding-top: 1.6rem; padding-bottom: 1.6rem; }

.px-3 { padding-left: 0.6rem; padding-right: 0.6rem; }
.px-4 { padding-left: 0.8rem; padding-right: 0.8rem; }
.px-5 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.2rem; padding-right: 1.2rem; }

.p-1 { padding: 0.2rem; }
.p-3 { padding: 0.6rem; }
.p-4 { padding: 0.8rem; }
.p-6 { padding: 1.2rem; }

.mt-1 { margin-top: 0.2rem; }
.mt-2 { margin-top: 0.4rem; }
.mt-3 { margin-top: 0.6rem; }
.mb-2 { margin-bottom: 0.4rem; }
.mb-3 { margin-bottom: 0.6rem; }
.mb-4 { margin-bottom: 0.8rem; }

.gap-1 { gap: 0.2rem; }
.gap-2 { gap: 0.4rem; }
.gap-3 { gap: 0.6rem; }
.gap-4 { gap: 0.8rem; }
.gap-6 { gap: 1.2rem; }
.gap-12 { gap: 2.4rem; }

.space-y-1 > * + * { margin-top: 0.2rem; }
.space-y-2 > * + * { margin-top: 0.4rem; }
.space-y-4 > * + * { margin-top: 0.8rem; }
.space-y-12 > * + * { margin-top: 2.4rem; }

/* Container and layout matching template_grid.js - scaled to 80% */
.max-w-\[1180px\] { max-width: 944px; }

/* Header styles matching template_grid.js - scaled to 80% */
.text-\[22px\] { font-size: 17.6px; }
.font-semibold { font-weight: 600; }
.tracking-tight { letter-spacing: -0.02em; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }

/* Sticky controls styling */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-20 { z-index: 20; }
.border-b { border-bottom-width: 1px; }
.border-gray-100 { border-color: #f3f4f6; }
.bg-\[rgba\(255\,255\,255\,0\.85\)\] { background-color: rgba(255,255,255,0.85); }
.backdrop-blur { backdrop-filter: blur(8px); }
.supports-\[backdrop-filter\]\:backdrop-blur-md:supports-backdrop-filter { backdrop-filter: blur(12px); }

/* Flexbox utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }

/* Border and background utilities */
.border { border-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-900 { border-color: #111827; }
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-900 { background-color: #111827; }

.rounded-xl { border-radius: 0.6rem; }
.rounded-2xl { border-radius: 0.8rem; }
.rounded-lg { border-radius: 0.4rem; }
.rounded-md { border-radius: 0.3rem; }
.rounded-full { border-radius: 9999px; }

/* Text utilities - scaled to 80% */
.text-xs { font-size: 0.6rem; line-height: 0.8rem; }
.text-sm { font-size: 0.7rem; line-height: 1rem; }
.text-\[15px\] { font-size: 12px; }
.font-medium { font-weight: 500; }

/* Hover states */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:opacity-95:hover { opacity: 0.95; }
.hover\:underline:hover { text-decoration-line: underline; }
.hover\:bg-gray-700:hover { background-color: #374151; }

/* Shadow utilities */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-\[0_1px_0_0_rgba\(0\,0\,0\,0\.03\)\] { box-shadow: 0 1px 0 0 rgba(0,0,0,0.03); }
.shadow-\[inset_0_0_0_1px_rgba\(0\,0\,0\,0\.06\)\] { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }

/* Grid utilities - scaled to 80% */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-\[1fr_320px\] { grid-template-columns: 1fr 256px; }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:inline { display: inline; }
    .sm\:block { display: block; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-\[1fr_320px\] { grid-template-columns: 1fr 256px; }
    .lg\:sticky { position: sticky; }
    .lg\:top-\[76px\] { top: 60.8px; }
}

/* Focus utilities */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px; }
.focus\:ring-gray-200:focus { --tw-ring-color: #e5e7eb; }

/* Display utilities */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Text utilities */
.truncate { 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Size utilities - scaled to 80% */
.size-2 { width: 0.4rem; height: 0.4rem; }
.size-5 { width: 1rem; height: 1rem; }
.w-6 { width: 1.2rem; }
.h-6 { height: 1.2rem; }
.w-9 { width: 1.8rem; }
.h-5 { height: 1rem; }
.w-4 { width: 0.8rem; }
.h-4 { height: 0.8rem; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.min-w-\[240px\] { min-width: 192px; }
.max-w-\[520px\] { max-width: 416px; }
.max-h-\[320px\] { max-height: 256px; }

/* Special utilities */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.shrink-0 { flex-shrink: 0; }
.place-items-center { place-items: center; }
.underline-offset-4 { text-underline-offset: 3.2px; }
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.translate-x-0 { transform: translateX(0); }
.translate-x-4 { transform: translateX(0.8rem); }

/* Custom toggle switch styles - scaled to 80% */
.toggle-switch {
    position: relative;
    width: 1.8rem;
    height: 1rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 150ms;
}

.toggle-switch.active {
    border-color: #111827;
    background-color: #111827;
}

.toggle-switch-thumb {
    position: absolute;
    top: 0.1rem;
    left: 0.1rem;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 9999px;
    background-color: #ffffff;
    transition: transform 150ms;
}

.toggle-switch.active .toggle-switch-thumb {
    transform: translateX(0.8rem);
}

/* Chip component styles (matching template_grid.js) - scaled to 80% */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    color: #374151;
    box-shadow: 0 1px 0 0 rgba(0,0,0,0.03);
}

.chip .remove-btn {
    margin-left: 0.2rem;
    display: inline-grid;
    width: 1rem;
    height: 1rem;
    place-items: center;
    border-radius: 0.3rem;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    background: transparent;
    cursor: pointer;
}

.chip .remove-btn:hover {
    background-color: #f9fafb;
}

/* Attack card styles (matching template_grid.js) - scaled to 80% */
.attack-card {
    width: 100%;
    border-radius: 0.8rem;
    border: 1px solid #e5e7eb;
    padding: 0.8rem;
    text-align: left;
    background-color: #ffffff;
    transition: all 150ms;
    cursor: pointer;
}

.attack-card:hover {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.attack-card.selected {
    border-color: #111827;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.attack-card .status-dot {
    display: inline-block;
    flex-shrink: 0;
    min-width: 0.4rem;
    min-height: 0.4rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 9999px;
    background-color: #d1d5db;
}

.attack-card.selected .status-dot {
    background-color: #111827;
}

.attack-card .title {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
}

.attack-card .summary {
    margin-top: 0.4rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 0.7rem;
    color: #4b5563;
}

.attack-card .tags {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.attack-card .tag {
    border-radius: 0.3rem;
    border: 1px solid #e5e7eb;
    padding: 0.1rem 0.3rem;
    font-size: 0.6rem;
    color: #4b5563;
}

.attack-card .selected-badge {
    border-radius: 0.3rem;
    border: 1px solid #d1d5db;
    padding: 0.1rem 0.3rem;
    font-size: 0.6rem;
    color: #374151;
}

/* Attack row styles for list view - scaled to 80% */
.attack-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    padding: 0.4rem 0.6rem;
    text-align: left;
    background-color: #ffffff;
    transition: all 150ms;
    cursor: pointer;
}

.attack-row:hover {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.attack-row.selected {
    border-color: #111827;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Sticky footer styles */
.bottom-0 { bottom: 0; }
.border-t { border-top-width: 1px; }
.bg-\[rgba\(255\,255\,255\,0\.9\)\] { background-color: rgba(255,255,255,0.9); }

/* Alert overrides to match the new design - scaled to 80% */
.evaluation-dashboard-container .alert {
    border-radius: 0.6rem;
    border: 1px solid #22c55e;
    background-color: #f0fdf4;
    color: #15803d;
    padding: 0.8rem;
    margin-bottom: 1.2rem;
}

.evaluation-dashboard-container .alert .btn-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: #15803d;
    opacity: 0.7;
}

.evaluation-dashboard-container .alert .btn-close:hover {
    opacity: 1;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reset all button borders in evaluation dashboard */
.evaluation-dashboard-container button {
    border: none !important;
    outline: none;
    background: transparent;
    cursor: pointer;
}

/* Restore borders for buttons that should have them */
.evaluation-dashboard-container button.border,
.evaluation-dashboard-container button.border-gray-200,
.evaluation-dashboard-container button.border-gray-300,
.evaluation-dashboard-container button.rounded-xl.border,
.evaluation-dashboard-container button.inline-flex.border {
    border: 1px solid #e5e7eb !important;
}

.evaluation-dashboard-container button.border-gray-300 {
    border: 1px solid #d1d5db !important;
}

/* Ensure specific button styling matches the design */
.evaluation-dashboard-container button.rounded-xl.bg-white {
    background-color: #ffffff !important;
}

.evaluation-dashboard-container button.bg-gray-100 {
    background-color: #f3f4f6 !important;
    border: none !important;
}

.evaluation-dashboard-container button.bg-gray-900 {
    border: none !important;
    background-color: #111827 !important;
}

/* Evaluating models container styling - scaled to 80% */
.evaluating-models-container {
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.evaluating-models-header h6 {
    font-size: 0.7rem;
    font-weight: 500;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.selected-models-icon {
    width: 0.8rem;
    height: 0.8rem;
}


