/* Tool-specific styles only - base styles are in tool-layout.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-tabs,
.output-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: transparent;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.tab-btn:hover {
    color: #e5e7eb;
    border-color: #6b7280;
}

.tab-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.code-input {
    background-color: #0a0a0a;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    min-height: 240px;
    width: 100%;
    resize: vertical;
    outline: none;
    tab-size: 2;
}

.code-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.code-input::placeholder {
    color: #6b7280;
}

.code-input-small {
    min-height: 120px;
}

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    outline: none;
}

.upload-icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.7;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-primary {
    font-size: 16px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.upload-secondary {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 6px;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    word-break: break-all;
    flex: 1;
}

.file-size {
    font-size: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}

.file-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.file-remove:hover {
    color: #ef4444;
}

.options-group {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-item > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 36px 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.select-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.select-input option {
    background-color: #1a1a1a;
}

label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
}

label.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 4px;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.validation-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
}

.validation-status.status-valid {
    background-color: #0a1a0a;
    border: 1px solid #10b981;
    color: #10b981;
}

.validation-status.status-invalid {
    background-color: #1a0a0a;
    border: 1px solid #ef4444;
    color: #ef4444;
}

.output-pane {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.code-output {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #e5e7eb;
    overflow-x: auto;
    white-space: pre;
    min-height: 120px;
    max-height: 500px;
    overflow-y: auto;
}

.code-output code {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.yaml-key {
    color: #82aaff;
}

.yaml-value {
    color: #c3e88d;
}

.yaml-string {
    color: #c3e88d;
}

.yaml-number {
    color: #f78c6c;
}

.yaml-boolean {
    color: #c792ea;
}

.yaml-null {
    color: #ff5370;
}

.yaml-comment {
    color: #545454;
    font-style: italic;
}

.yaml-separator {
    color: #89ddff;
}

.json-key {
    color: #82aaff;
}

.json-string {
    color: #c3e88d;
}

.json-number {
    color: #f78c6c;
}

.json-boolean {
    color: #c792ea;
}

.json-null {
    color: #ff5370;
}

.schema-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.schema-type-selector {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.schema-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.schema-btn:hover:not(:disabled) {
    background-color: #374151;
}

.schema-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.schema-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schema-error-item {
    padding: 10px 12px;
    background-color: #1a0a0a;
    border: 1px solid #374151;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    font-size: 13px;
}

.schema-error-path {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    color: #82aaff;
    font-size: 12px;
    margin-bottom: 4px;
}

.schema-error-message {
    color: #fca5a5;
}

.schema-pass {
    padding: 12px 16px;
    background-color: #0a1a0a;
    border: 1px solid #10b981;
    border-radius: 6px;
    color: #10b981;
    font-size: 14px;
    font-weight: 500;
}

.diff-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.diff-section > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.diff-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diff-item {
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.diff-added {
    background-color: #0a1a0a;
    border-left: 3px solid #10b981;
}

.diff-removed {
    background-color: #1a0a0a;
    border-left: 3px solid #ef4444;
}

.diff-modified {
    background-color: #1a1a0a;
    border-left: 3px solid #f59e0b;
}

.diff-path {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    color: #82aaff;
    font-size: 12px;
    margin-bottom: 4px;
}

.diff-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.diff-type-added {
    color: #10b981;
}

.diff-type-removed {
    color: #ef4444;
}

.diff-type-modified {
    color: #f59e0b;
}

.diff-value {
    color: #9ca3af;
    font-size: 13px;
}

.diff-empty {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.batch-section {
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.batch-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

.batch-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
}

.batch-upload-zone:hover {
    border-color: #3b82f6;
}

.batch-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
    gap: 12px;
}

.batch-result-name {
    font-size: 13px;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-result-status {
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.batch-result-status.valid {
    color: #10b981;
}

.batch-result-status.invalid {
    color: #ef4444;
}

.batch-result-error {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.query-section {
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.query-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

.query-input-row {
    display: flex;
    gap: 8px;
}

.query-input {
    flex: 1;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input::placeholder {
    color: #6b7280;
}

.query-result {
    padding: 12px 16px;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 14px;
    color: #e5e7eb;
    min-height: 40px;
}

.query-result:empty {
    display: none;
}

.query-result-type {
    display: inline-block;
    background-color: #374151;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    font-family: inherit;
    letter-spacing: 0.5px;
}

.error-display {
    background-color: #1a0a0a;
    border: 1px solid #ef4444;
    border-radius: 6px;
    padding: 16px;
}

.error-header {
    font-size: 14px;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 8px;
}

.error-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.error-position {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    color: #f59e0b;
}

.error-message {
    font-size: 14px;
    color: #fca5a5;
    line-height: 1.5;
}

.stats-display {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-item {
    flex: 1 1 calc(25% - 9px);
    min-width: 100px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.output-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.modal-feature-label {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #374151;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #9ca3af;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.bug-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 24px;
}

.bug-report-content {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
}

.bug-report-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.bug-report-content textarea {
    background-color: #0a0a0a;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    min-height: 100px;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
}

.bug-report-content textarea:focus {
    border-color: #3b82f6;
}

.bug-report-content textarea::placeholder {
    color: #6b7280;
}

.bug-report-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.bug-report-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

#bug-cancel {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
}

#bug-cancel:hover {
    background-color: #374151;
}

#bug-submit {
    background-color: #3b82f6;
    border: none;
    color: #ffffff;
}

#bug-submit:hover {
    background-color: #2563eb;
}

.modal-hidden {
    display: none;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .output-section {
        padding: 16px;
    }

    .options-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .stat-item {
        flex: 1 1 calc(50% - 6px);
        padding: 10px;
    }

    .stat-value {
        font-size: 14px;
    }

    .file-upload-zone {
        padding: 32px 16px;
    }

    .query-input-row {
        flex-direction: column;
    }

    .schema-type-selector {
        flex-wrap: wrap;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .output-tabs {
        gap: 4px;
    }

    .tab-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .batch-result-item {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stat-item {
        flex: 1 1 calc(50% - 6px);
    }

    .schema-btn {
        flex: 1 1 calc(50% - 2px);
        text-align: center;
    }

    .input-tabs {
        flex-wrap: nowrap;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
    }
}