/* Tool Hero Section - Required by tool-page-structure.mdc */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* JSON Highlighter Section */
.json-highlighter-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.highlighter-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

/* Header */
.highlighter-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.header-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.control-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.875rem;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.control-select:hover {
    border-color: #9ca3af;
}

.control-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn-primary {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.action-btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-text {
    display: inline-block;
}

/* Editor Wrapper */
.highlighter-editor-wrapper {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: #ffffff;
}

.json-editor {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Footer */
.highlighter-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.footer-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-item {
    color: #6b7280;
    font-size: 0.8125rem;
}

.footer-status {
    color: #059669;
    font-size: 0.8125rem;
    font-weight: 500;
}

.footer-status.error {
    color: #dc2626;
}

.footer-status.hidden {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .json-highlighter-section {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .highlighter-card {
        border-radius: 8px;
        min-height: 400px;
    }

    .highlighter-header {
        padding: 0.875rem 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .header-controls {
        width: 100%;
    }

    .control-group {
        flex: 1;
        min-width: 0;
    }

    .control-select {
        width: 100%;
        min-width: 0;
    }

    .header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .btn-text {
        display: none;
    }

    .action-btn {
        padding: 0.5rem;
        justify-content: center;
    }

    .highlighter-editor-wrapper {
        min-height: 350px;
    }

    .json-editor {
        min-height: 350px;
    }

    .highlighter-footer {
        padding: 0.625rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer-info {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .highlighter-editor-wrapper {
        min-height: 300px;
    }

    .json-editor {
        min-height: 300px;
    }

    .control-label {
        font-size: 0.6875rem;
    }

    .control-select {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.625rem;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .highlighter-card {
        background: #1f2937;
        border-color: #374151;
    }

    .highlighter-header {
        background: #111827;
        border-color: #374151;
    }

    .control-select {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .control-select:hover {
        border-color: #6b7280;
    }

    .control-label {
        color: #9ca3af;
    }

    .action-btn {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .action-btn:hover {
        background: #374151;
        border-color: #6b7280;
    }

    .highlighter-editor-wrapper {
        background: #1f2937;
    }

    .highlighter-footer {
        background: #111827;
        border-color: #374151;
    }

    .info-item {
        color: #9ca3af;
    }
}
