/* ==============================================
   Recipe Selector Modal
   ============================================== */
   .recipe-selector-content {
    max-width: 900px;
    max-height: 85vh;
    background-color: var(--node-bg);
    border: 1px solid var(--node-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-medium);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 1rem;
}

.recipe-search {
    margin-bottom: 1.5rem;
}

.recipe-search .search-wrapper {
    width: 100%;
}

.recipe-search input {
    width: 100%;
}

#recipe-search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--node-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition-speed), background-color var(--transition-speed);
    font-family: inherit;
}

#recipe-search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 2px rgba(var(--accent-blue-rgb), 0.2);
}

.category-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--node-border);
    overflow-x: auto;
}

.category-tab {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all var(--transition-speed);
    font-family: inherit;
}

.category-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.category-tab:hover {
    color: var(--text-primary);
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.recipe-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--node-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 4px var(--shadow-light);
}

.recipe-item:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 8px var(--shadow-medium);
}

.recipe-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.recipe-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recipe-item-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-item-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.recipe-item.is-raw-item {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--text-tertiary);
    pointer-events: none;
}

.recipe-item-status {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.no-recipes-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* ==============================================
   Recipe Selector Component
   ============================================== */
.recipe-selector {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--node-border);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 4px var(--shadow-light);
    font-family: inherit;
}

.recipe-selector:hover {
    background-color: var(--bg-primary);
    box-shadow: 0 4px 8px var(--shadow-medium);
}

.recipe-selector-icon {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    object-fit: cover;
}

.recipe-selector span {
    flex: 1;
}

.recipe-dropdown {
    position: absolute;
    background-color: var(--node-bg);
    border: 1px solid var(--node-border);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 2000;
    min-width: 200px;
    max-width: 250px;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 8px 16px var(--shadow-heavy);
    display: none;
    scrollbar-width: thin;
    scrollbar-color: var(--node-border) transparent;
    font-family: inherit;
}

.recipe-dropdown::-webkit-scrollbar {
    width: 6px;
}

.recipe-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.recipe-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--node-border);
    border-radius: 3px;
}

.recipe-dropdown.is-active {
    display: block;
}

.recipe-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: background-color var(--transition-speed);
}

.recipe-option:hover {
    background-color: var(--accent-blue);
}

.recipe-option-header {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    font-weight: 500;
}

.recipe-option-header span {
    font-size: 0.8rem;
}

.recipe-option-header img {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.recipe-option-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.recipe-component {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 60px; 
    text-align: center;
}

.component-category {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    text-align: center;
    max-width: 60px;
    word-wrap: break-word;
    line-height: 1.1;
}

.recipe-option-content img {
    width: 24px;
    height: 24px;
    border-radius: 3px;
}

.recipe-arrow {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

/* Clear button for search input */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: all var(--transition-speed);
    display: none;
}

.search-clear-btn:hover {
    color: var(--text-primary);
    background-color: transparent;
}

#recipe-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--node-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition-speed), background-color var(--transition-speed);
    font-family: inherit;
}

.recipe-search .search-wrapper i.fa-search {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    z-index: 1;
}