/**
 * Schema Validator Mode Styles
 */

.validator-layout {
    display: grid;
    grid-template-columns: 200px 1fr 260px;
    gap: 1.5rem;
    padding: 1.5rem;
    min-height: calc(100vh - 200px);
}

.schema-loader select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-light, #E5E7EB);
    border-radius: 4px;
    font-size: 0.8125rem;
    background: white;
    margin-bottom: 0.5rem;
}

.or-divider {
    display: block;
    text-align: center;
    font-size: 0.6875rem;
    color: var(--text-tertiary, #9CA3AF);
    margin: 0.5rem 0;
}

.schema-loader input[type="file"] {
    width: 100%;
    font-size: 0.75rem;
}

.validation-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    cursor: pointer;
}

.validation-options input {
    accent-color: #6366F1;
}

.stats-list dd.valid {
    color: #059669;
}

.stats-list dd.invalid {
    color: #DC2626;
}

/* Main Validator Area */
.schema-main {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-light, #E5E7EB);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.validator-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-light, #E5E7EB);
    flex: 1;
    min-height: 200px;
}

.panel {
    background: white;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light, #E5E7EB);
    background: var(--paper-sand, #FDFBF7);
}

.panel-header h3 {
    margin: 0;
    font-size: 0.875rem;
}

.schema-status {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.schema-status.valid {
    background: #D1FAE5;
    color: #065F46;
}

.schema-status.invalid {
    background: #FEE2E2;
    color: #DC2626;
}

.action-btn.primary {
    padding: 0.375rem 0.75rem;
    background: #6366F1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.action-btn.primary:hover {
    background: #4F46E5;
}

.panel-body {
    flex: 1;
    display: flex;
}

.panel-body textarea {
    width: 100%;
    height: 100%;
    min-height: 150px;
    padding: 1rem;
    border: none;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    line-height: 1.5;
    resize: none;
}

/* Validation Results */
.validation-results {
    border-top: 1px solid var(--border-light, #E5E7EB);
}

.results-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light, #E5E7EB);
    background: var(--paper-sand, #FDFBF7);
}

.results-header h3 {
    margin: 0;
    font-size: 0.875rem;
}

#results-body {
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary, #6B7280);
}

.result-success {
    text-align: center;
    padding: 1.5rem;
}

.success-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    background: #D1FAE5;
    color: #059669;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.result-success h4 {
    margin: 0 0 0.25rem 0;
    color: #059669;
}

.result-success p {
    margin: 0;
    color: var(--text-secondary, #6B7280);
}

.result-errors {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.error-item:hover {
    border-color: #DC2626;
}

.error-item.selected {
    border-color: #DC2626;
    background: #FEE2E2;
}

.error-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #DC2626;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.error-content {
    flex: 1;
    min-width: 0;
}

.error-path {
    display: block;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: #DC2626;
    margin-bottom: 0.125rem;
}

.error-message {
    display: block;
    font-size: 0.8125rem;
}

/* Context Panel */
#error-detail {
    background: var(--paper-sand, #FDFBF7);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-light, #E5E7EB);
}

#error-detail.hidden {
    display: none;
}

#error-detail h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #6B7280);
    margin: 0 0 0.75rem 0;
}

#error-detail dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    margin: 0;
    font-size: 0.8125rem;
}

#error-detail dt {
    color: var(--text-secondary, #6B7280);
}

#error-detail dd {
    margin: 0;
    word-break: break-word;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
}

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

    .schema-sidebar,
    .schema-context {
        display: none;
    }

    .validator-panels {
        grid-template-columns: 1fr;
    }
}
