/* Custom styles for mockTB frontend */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dark Mode Overrides */
.dark {
    color-scheme: dark;
}

.dark .bg-white {
    background-color: rgb(31, 41, 55) !important; /* gray-800 */
}

.dark .text-gray-900 {
    color: rgb(243, 244, 246) !important; /* gray-100 */
}

.dark .text-gray-700 {
    color: rgb(209, 213, 219) !important; /* gray-300 */
}

.dark .text-gray-600 {
    color: rgb(156, 163, 175) !important; /* gray-400 */
}

.dark .text-gray-500 {
    color: rgb(107, 114, 128) !important; /* gray-500 */
}

.dark .border-gray-200 {
    border-color: rgb(55, 65, 81) !important; /* gray-700 */
}

.dark .border-gray-300 {
    border-color: rgb(75, 85, 99) !important; /* gray-600 */
}

.dark input,
.dark select,
.dark textarea {
    background-color: rgb(55, 65, 81); /* gray-700 */
    border-color: rgb(75, 85, 99); /* gray-600 */
    color: rgb(243, 244, 246); /* gray-100 */
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: rgb(59, 130, 246); /* blue-500 */
    background-color: rgb(55, 65, 81); /* gray-700 */
}

.dark .bg-gray-50 {
    background-color: rgb(17, 24, 39) !important; /* gray-900 */
}

.dark .bg-gray-100 {
    background-color: rgb(31, 41, 55) !important; /* gray-800 */
}

.dark .shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.26);
}

.dark .hover\:bg-gray-100:hover {
    background-color: rgb(55, 65, 81) !important; /* gray-700 */
}

.dark code {
    background-color: rgb(55, 65, 81);
    color: rgb(243, 244, 246);
}

.dark pre {
    background-color: rgb(17, 24, 39) !important;
}

.dark table th {
    background-color: rgb(31, 41, 55) !important;
    color: rgb(243, 244, 246);
}

.dark table td,
.dark table th {
    border-color: rgb(55, 65, 81);
}

/* Custom dark mode alternating row colors for preview */
.dark .bg-gray-750 {
    background-color: rgb(42, 52, 66) !important; /* Between gray-800 and gray-700 */
}

.tab-button {
    transition: all 0.2s ease;
}

.tab-button.active {
    border-bottom-color: #3b82f6;
    color: #3b82f6;
}

.tab-content {
    animation: fadeIn 0.3s ease-in;
}

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

/* Table styles */
table {
    font-size: 0.75rem;
}

table th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Code blocks */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Loading animation */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Preview table */
#preview-content table {
    width: 100%;
    border-collapse: collapse;
}

#preview-content th,
#preview-content td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    text-align: left;
}

#preview-content th {
    background: #f9fafb;
    font-weight: 600;
}

#preview-content tr:nth-child(even) {
    background: #f9fafb;
}

/* Status indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background-color: #10b981;
}

.status-offline {
    background-color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: 1fr;
    }
}
