/* Converter Styles */
.pantone-hex-converter {
    margin-bottom: 2rem;
}

.tool-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 3rem;
}

.tool-card-left {
    padding: 1.5rem;
    border-right: 1px solid #e9ecef;
    background: #fafbfc;
}

.tool-card-right {
    padding: 1.5rem;
    background: #ffffff;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.section-header {
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.section-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.pantone-hex-search-container {
    position: relative;
}

.pantone-hex-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.pantone-hex-search-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pantone-hex-search-icon {
    display: flex;
    align-items: center;
    color: #6b7280;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.pantone-hex-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    background: transparent;
}

.pantone-hex-search-input::placeholder {
    color: #9ca3af;
}

.pantone-hex-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pantone-hex-clear-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.pantone-hex-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.pantone-hex-search-results.active {
    display: block;
}

.pantone-hex-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.pantone-hex-result-item:last-child {
    border-bottom: none;
}

.pantone-hex-result-item:hover {
    background: #f9fafb;
}

.pantone-hex-result-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.pantone-hex-result-info {
    flex: 1;
    min-width: 0;
}

.pantone-hex-result-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pantone-hex-result-code {
    font-size: 0.8rem;
    color: #6b7280;
}

.pantone-hex-result-hex {
    font-size: 0.8rem;
    color: #9ca3af;
    
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chip {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #e5e7eb;
}

.filter-chip.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Output Section */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.color-preview-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.color-preview-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.preview-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-hex-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-hex-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.color-preview {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.1;
}

.preview-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem;
}

.preview-hex {
    font-size: 2rem;
    font-weight: 700;
    
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-name {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.color-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.detail-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-label {
    min-width: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    
}

.detail-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.detail-copy:hover {
    background: #3b82f6;
    color: #fff;
}

/* Color Palette Section */
.color-palette-section {
    margin-top: 3rem;
}

.palette-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.palette-item {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.palette-item:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.palette-color {
    width: 100%;
    height: 100px;
    position: relative;
}

.palette-info {
    padding: 0.875rem;
}

.palette-code {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.palette-hex {
    font-size: 0.75rem;
    color: #6b7280;
    
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-card {
        grid-template-columns: 1fr;
    }

    .tool-card-left {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .color-preview {
        height: 160px;
    }

    .preview-hex {
        font-size: 1.5rem;
    }

    .palette-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .palette-color {
        height: 80px;
    }

    .toast-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 480px) {
    .pantone-hex-search-wrapper {
        padding: 0.625rem 0.875rem;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .copy-hex-btn {
        width: 100%;
        justify-content: center;
    }

    .detail-item {
        flex-wrap: wrap;
        padding: 0.875rem 1rem;
    }

    .detail-label {
        min-width: auto;
        width: 100%;
    }

    .palette-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
