/**
 * UI Test Dashboard - Additional Custom Styles
 * Extends TailwindCSS with dashboard-specific styling
 */

/* Progress Bar Custom Styling */
progress {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    height: 8px;
    border-radius: 4px;
    background-color: #e5e7eb;
}

progress::-webkit-progress-bar {
    background-color: #e5e7eb;
    border-radius: 4px;
}

progress::-webkit-progress-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

progress::-moz-progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

/* Checkbox Styling */
input[type="checkbox"] {
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #667eea;
    border-color: #667eea;
}

/* Scrollbar Styling */
.scenario-checklist::-webkit-scrollbar,
.issues-container::-webkit-scrollbar {
    width: 8px;
}

.scenario-checklist::-webkit-scrollbar-track,
.issues-container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.scenario-checklist::-webkit-scrollbar-thumb,
.issues-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.scenario-checklist::-webkit-scrollbar-thumb:hover,
.issues-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Table Hover Effects */
table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:hover {
    background-color: #f9fafb;
}

/* Toast Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#success-toast:not(.translate-x-full),
#error-toast:not(.translate-x-full) {
    animation: slideIn 0.3s ease-out;
}

/* Modal Backdrop Animation */
#test-details-modal:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Chart Container Responsive Sizing */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
}

/* Stat Cards Gradient */
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Issue Card Severity Indicators */
.issue-card[data-severity="critical"]::before {
    content: "🔴";
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
}

.issue-card[data-severity="warning"]::before {
    content: "⚠️";
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
}

.issue-card[data-severity="info"]::before {
    content: "ℹ️";
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
}

/* Custom Select Dropdown Styling */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Responsive Tab Navigation */
@media (max-width: 640px) {
    .tab-button span:not(.bg-blue-500):not(.bg-red-500) {
        display: none;
    }
}

/* Print Styles */
@media print {
    .gradient-bg,
    .tab-button,
    button,
    #success-toast,
    #error-toast {
        display: none !important;
    }

    .tab-content {
        display: block !important;
        page-break-inside: avoid;
    }

    table {
        border-collapse: collapse;
        width: 100%;
    }

    table th,
    table td {
        border: 1px solid #ddd;
        padding: 8px;
    }
}
