/* Named Colors Preview Tool Styles */
.named-colors-tool {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.named-colors-tool h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
}

.search-container {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.color-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: white;
}

.color-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-swatch {
    height: 100px;
    position: relative;
}

.color-info {
    padding: 12px;
    background-color: white;
}

.color-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.color-codes {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
}

.copy-btn {
    background-color: transparent;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: #f1f1f1;
}

.tooltip {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.color-swatch:hover .tooltip {
    opacity: 1;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.filter-btn:hover {
    background-color: #f1f1f1;
}

.filter-btn.active:hover {
    background-color: #2980b9;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .color-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .color-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .color-name {
        font-size: 14px;
    }
    
    .color-codes {
        font-size: 11px;
    }
}