/* 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-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

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

.template-group {
    padding: 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.select-input {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    width: 100%;
    -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;
    padding-right: 36px;
    transition: border-color 150ms ease;
}

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

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

.json-editor {
    width: 100%;
    min-height: 300px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #ffffff;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    padding: 16px;
    border-radius: 8px;
    outline: none;
    resize: vertical;
    tab-size: 2;
    -moz-tab-size: 2;
    transition: border-color 150ms ease;
}

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

.json-editor::placeholder {
    color: #555555;
}

.line-col-indicator {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.75rem;
    color: #666666;
}

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

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    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: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.output-tabs {
    display: flex;
    border-bottom: 1px solid #374151;
    gap: 0;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888888;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

.tab-content {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.tab-content.active {
    display: flex;
}

.code-output {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
}

.code-output pre {
    margin: 0;
}

.code-output code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: #e5e7eb;
}

.json-key {
    color: #3b82f6;
}

.json-string {
    color: #10b981;
}

.json-number {
    color: #f59e0b;
}

.json-boolean {
    color: #a855f7;
}

.json-null {
    color: #888888;
}

.json-bracket {
    color: #666666;
}

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

.summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    background-color: #0a0a0a;
    border-radius: 6px;
    align-items: center;
}

.summary-errors {
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
}

.summary-warnings {
    color: #f59e0b;
    font-size: 14px;
    font-weight: 600;
}

.summary-infos {
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
}

.summary-pass {
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
}

.validation-results {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.validation-item {
    padding: 12px 16px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.validation-item:last-child {
    border-bottom: none;
}

.validation-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.severity-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.severity-error {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.severity-warning {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.severity-info {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.validation-path {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.8rem;
    color: #888888;
}

.validation-message {
    font-size: 0.85rem;
    color: #ffffff;
    line-height: 1.5;
}

.validation-fix {
    font-size: 0.8rem;
    color: #666666;
    font-style: italic;
    line-height: 1.4;
}

.rich-result-card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.rich-result-card:last-child {
    margin-bottom: 0;
}

.rich-result-pass {
    border-left: 3px solid #10b981;
}

.rich-result-fail {
    border-left: 3px solid #ef4444;
}

.rich-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rich-result-type {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
}

.rich-result-status {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rich-result-status.pass {
    color: #10b981;
}

.rich-result-status.fail {
    color: #ef4444;
}

.rich-result-checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rich-result-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #e5e7eb;
}

.check-pass {
    color: #10b981;
    font-weight: 600;
    flex-shrink: 0;
}

.check-fail {
    color: #ef4444;
    font-weight: 600;
    flex-shrink: 0;
}

.fix-highlight {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 2px solid #3b82f6;
    padding-left: 8px;
}

.inline-feedback {
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
    padding: 6px 0;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
}

.modal-hidden {
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    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: 640px;
    width: 100%;
    max-height: 85vh;
    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;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-description {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
}

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

.bulk-editor {
    min-height: 220px;
}

.bulk-results {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bulk-results-table {
    width: 100%;
    border-collapse: collapse;
}

.bulk-results-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 1px solid #374151;
}

.bulk-results-table td {
    font-size: 13px;
    color: #e5e7eb;
    padding: 10px 12px;
    border-bottom: 1px solid #1a1a1a;
}

.bulk-results-table tr {
    cursor: pointer;
    transition: background-color 150ms ease;
}

.bulk-results-table tbody tr:hover {
    background-color: #1a1a1a;
}

.bulk-results-table .status-pass {
    color: #10b981;
    font-weight: 600;
}

.bulk-results-table .status-fail {
    color: #ef4444;
    font-weight: 600;
}

.bulk-block-detail {
    padding: 16px;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    margin-top: 12px;
}

.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;
}

.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;
}

.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;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

@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;
    }

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

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

    .output-actions {
        flex-direction: column;
    }

    .output-actions .button-secondary {
        width: 100%;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .code-output {
        padding: 12px;
    }

    .summary-bar {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

        padding: 0 16px;
    }

    .template-group {
        padding: 12px;
    }

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

    .modal-actions {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .output-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 10px 12px;
        font-size: 12px;
    }

    .json-editor {
        min-height: 240px;
        font-size: 0.8rem;
    }

    .validation-item {
        padding: 10px 12px;
    }
}