/* Custom Styles for Infor MCP Server */

:root {
    --primary-color: #0066cc;
    --secondary-color: #004080;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
}

/* Dark mode variables */
.dark {
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

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

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

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

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Dark mode toggle icons */
.dark .dark-mode-sun {
    display: none;
}

.dark .dark-mode-moon {
    display: block !important;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 100;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

.dark .toast {
    background: #1f2937;
    color: #f3f4f6;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease-out forwards;
}

/* Tool card animations */
.tool-card {
    transition: all 0.2s ease-in-out;
}

.tool-card:hover {
    transform: translateY(-2px);
}

/* Accordion animations */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.open {
    max-height: 2000px; /* Large enough to fit content */
}

/* Copy button feedback */
.copy-btn {
    transition: all 0.2s ease-in-out;
}

.copy-btn:hover {
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Integration tab styling */
.integration-tab {
    transition: all 0.2s ease-in-out;
}

.integration-tab.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.dark .integration-tab.active {
    color: #3b82f6;
    border-color: #3b82f6;
}

/* QR Code canvas */
#qr-canvas {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Syntax highlighting overrides for dark mode */
.dark pre[class*="language-"],
.dark code[class*="language-"] {
    background: #111827;
    color: #f3f4f6;
}

.dark :not(pre) > code[class*="language-"] {
    background: #1f2937;
}

/* Health indicator pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#health-indicator.checking {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#health-indicator.healthy {
    background-color: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

#health-indicator.unhealthy {
    background-color: var(--error-color);
    box-shadow: 0 0 10px var(--error-color);
}

/* Search input focus effects */
#tool-search:focus {
    outline: none;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Smooth transitions for all interactive elements */
button, a, input, select {
    transition: all 0.2s ease-in-out;
}

/* Hover effects for cards */
.hover\:shadow-lg {
    transition: box-shadow 0.2s ease-in-out;
}

/* Tool parameter badges */
.param-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.param-required {
    background-color: #fecaca;
    color: #991b1b;
}

.dark .param-required {
    background-color: #7f1d1d;
    color: #fecaca;
}

.param-optional {
    background-color: #dbeafe;
    color: #1e40af;
}

.dark .param-optional {
    background-color: #1e3a8a;
    color: #dbeafe;
}

/* Category badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-customer {
    background-color: #dbeafe;
    color: #1e40af;
}

.dark .category-customer {
    background-color: #1e3a8a;
    color: #dbeafe;
}

.category-order {
    background-color: #d1fae5;
    color: #065f46;
}

.dark .category-order {
    background-color: #064e3b;
    color: #d1fae5;
}

.category-service-order {
    background-color: #fce7f3;
    color: #9f1239;
}

.dark .category-service-order {
    background-color: #831843;
    color: #fce7f3;
}

.category-item {
    background-color: #fef3c7;
    color: #92400e;
}

.dark .category-item {
    background-color: #78350f;
    color: #fef3c7;
}

.category-system {
    background-color: #e9d5ff;
    color: #6b21a8;
}

.dark .category-system {
    background-color: #581c87;
    color: #e9d5ff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toast {
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }

    .integration-tab {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

/* Print styles */
@media print {
    header, footer, #dark-mode-toggle, .copy-btn {
        display: none;
    }

    .bg-white, .dark\:bg-gray-800 {
        background: white !important;
    }

    .text-gray-900, .dark\:text-gray-100 {
        color: black !important;
    }
}
