/* DDX Main Styles */

/* Alpine.js x-cloak - hide elements until Alpine is ready */
[x-cloak] {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
}

header h1 {
    font-size: 1.5rem;
}

/* Removed main width constraint to allow full-width layout with Tailwind
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}
*/

footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    background-color: #ecf0f1;
    color: #7f8c8d;
}

/* Reset default dd margin to prevent indent */
dd {
    margin-inline-start: 0;
}

/* Restore padding stripped by the * reset above.
   Tailwind utility classes (px-3, py-2, etc.) override this via higher specificity. */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]):not([type="color"]),
textarea,
select {
    padding: 0.375rem 0.625rem;
}

/* Graph-Enhanced Duplicate Detection Styles */

/* Toggle Switch Animation */
.peer-checked\:translate-x-5:checked ~ .dot {
    transform: translateX(1.25rem);
}

/* Graph-Enhanced Card Indicator */
.graph-enhanced-card {
    border-left: 3px solid #8b5cf6 !important;
    background: linear-gradient(to right, #f5f3ff 0%, white 10%);
}

/* Reasoning Section Styles */
.reasoning-section {
    animation: slideDown 0.3s ease-out;
}

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

/* Reasoning Items by Importance */
.reasoning-high {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.reasoning-medium {
    background: #dbeafe;
    border-left: 3px solid #3b82f6;
}

.reasoning-low {
    background: #f3f4f6;
    border-left: 3px solid #9ca3af;
}

/* Shared Entity Badges */
.entity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.entity-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Method Badges */
.method-badge {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    background: #f3f4f6;
    border-radius: 0.25rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Graph Indicator Animation */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.graph-enhanced-card [title="Enhanced with knowledge graph"] {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Toggle Container Styles */
.peer {
    position: relative;
}

.peer:focus ~ .dot {
    box-shadow: 0 0 0 2px #8b5cf6;
}

/* Reasoning Toggle Button */
button[type="button"]:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Smooth transitions for all interactive elements */
.entity-badge,
.method-badge,
button {
    transition: all 0.2s ease;
}

/* Scrollbar Visible Styling for Tag Containers */
.scrollbar-visible {
    overflow-y: auto !important;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #cbd5e0 #f7fafc; /* thumb: gray-400, track: gray-100 */
}

/* Webkit browsers (Chrome, Safari, Edge) */
.scrollbar-visible::-webkit-scrollbar {
    width: 8px;
}

.scrollbar-visible::-webkit-scrollbar-thumb {
    background: #cbd5e0; /* gray-400 */
    border-radius: 4px;
}

.scrollbar-visible::-webkit-scrollbar-thumb:hover {
    background: #9ca3af; /* gray-500 */
}

.scrollbar-visible::-webkit-scrollbar-track {
    background: #f7fafc; /* gray-100 */
    border-radius: 4px;
}

/* Linear Groups - LLM Reasoning UI (Phase 2) */

/* Confidence Badge */
.confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f3f4f6; /* gray-100 */
    border-radius: 4px;
    font-size: 0.75rem; /* text-xs */
    color: #6b7280; /* gray-600 */
}

/* Reasoning Section */
.reasoning-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb; /* gray-200 */
}

.reasoning-toggle {
    background: none;
    border: none;
    color: #6b7280; /* gray-600 */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem; /* text-xs */
}

.reasoning-toggle:hover {
    color: #374151; /* gray-700 */
}

.reasoning-content {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb; /* gray-50 */
    border-radius: 6px;
}

.reasoning-text {
    color: #374151; /* gray-700 */
    line-height: 1.6;
    margin-bottom: 12px;
}

.aspects-list ul,
.differences-list ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.aspects-list li,
.differences-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.75rem; /* text-xs */
}
