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

.tool-main {
    margin-top: 60px;
}

.pattern-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.pattern-block {
    background: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.pattern-block:hover {
    background: #374151;
    border-color: #3b82f6;
}

.pattern-block:active {
    transform: scale(0.98);
}

.pattern-block-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.pattern-block-pattern {
    font-size: 11px;
    font-family: 'Monaco', 'Menlo', monospace;
    color: #6b7280;
    word-break: break-all;
}

.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.category-tab {
    background: transparent;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

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

.built-pattern-container {
    background: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.built-pattern-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.built-pattern-output {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 15px;
    color: #e5e7eb;
    background: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px 16px;
    min-height: 44px;
    word-break: break-all;
    display: flex;
    align-items: center;
}

.built-pattern-output:empty::before {
    content: 'Click pattern blocks to build your regex...';
    color: #6b7280;
}

.pattern-segment {
    display: inline-flex;
    align-items: center;
    background: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 2px 6px;
    margin: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pattern-segment:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.pattern-segment-remove {
    margin-left: 6px;
    color: #6b7280;
    font-size: 12px;
}

.pattern-segment:hover .pattern-segment-remove {
    color: #ef4444;
}

.builder-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.quantifier-section {
    background: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.quantifier-section-title {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    margin-bottom: 12px;
}

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

.quantifier-btn {
    background: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', monospace;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quantifier-btn:hover {
    background: #374151;
    border-color: #3b82f6;
}

.quantifier-btn-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #6b7280;
    display: block;
    margin-top: 2px;
}

.custom-input-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.custom-input-row input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    color: #e5e7eb;
}

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

.custom-input-row input:focus {
    outline: none;
    border-color: #3b82f6;
}

.test-section {
    background: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px;
}

.test-input-wrapper {
    position: relative;
}

.test-input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    color: #e5e7eb;
    min-height: 100px;
    resize: vertical;
}

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

.test-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.match-results {
    margin-top: 16px;
}

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

.match-count-badge {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.match-count-badge.has-matches {
    color: #10b981;
}

.match-count-badge.no-matches {
    color: #ef4444;
}

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

.match-item {
    background: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-text {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #e5e7eb;
    word-break: break-all;
}

.match-index {
    font-size: 12px;
    color: #6b7280;
    margin-left: 12px;
    white-space: nowrap;
}

.highlighted-test {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.6;
    background: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px 16px;
    min-height: 100px;
    white-space: pre-wrap;
    word-break: break-all;
    color: #e5e7eb;
}

.highlight-match {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 2px;
    padding: 1px 0;
}

.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.cheatsheet-card {
    background: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px;
}

.cheatsheet-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 12px;
}

.cheatsheet-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1a1a1a;
}

.cheatsheet-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cheatsheet-syntax {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #3b82f6;
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 12px;
    min-width: 60px;
    text-align: center;
}

.cheatsheet-desc {
    font-size: 13px;
    color: #9ca3af;
    flex: 1;
}

.output-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #374151;
    padding-bottom: 12px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

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

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

.tab-content {
    display: none;
}

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

.pro-badge {
    display: inline-block;
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

@media (max-width: 768px) {
    .pattern-blocks {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }
    
    .category-tab {
        white-space: nowrap;
    }
    
    .cheatsheet-grid {
        grid-template-columns: 1fr;
    }
    
    .builder-actions {
        flex-direction: column;
    }
    
    .builder-actions button {
        width: 100%;
    }
}